wustl-cig / DeCAF

MIT License
46 stars 5 forks source link

TypeError in model.py #2

Closed clemacq closed 2 years ago

clemacq commented 2 years ago

Description

TypeError: Input 'b' of 'MatMul' Op has type float64 that does not match type float32 of argument 'a'.

To Reproduce

python main.py --flagfile=.\datasets\Diatom\train_config.txt

Files

model.py line 204: xy_freq = tf.matmul(in_node[:, :2], fourier_mapping)

Tasks

add ".astype('float32')" to "fourier_mapping = np.concatenate((s, c), axis=1).T" (line 202)

RenHao116 commented 2 years ago

Hi @clemacq, I checked this with our machine and did not see the error. I suspect this is an environment problem (see decaf.yml).

Thanks for raising the issue and providing the fix for others who might have similar problems.