wang-research / VASC

Variational autoencoder for single cell RNA-seq datasets
43 stars 17 forks source link

TypeError: 'module' object is not callable #2

Open Zixiangluo opened 4 years ago

Zixiangluo commented 4 years ago

Hi, when I am running the demo.py, It always shows the following error. It also appears when I use it with my own data. Can anyone help me with that? Thank you!!!

Traceback (most recent call last): File "/Users/zixiangluo/Desktop/testvasc/demo.py", line 72, in patience=config['patience'] File "/Users/zixiangluo/Desktop/testvasc/vasc.py", line 243, in vasc vae_.vaeBuild() File "/Users/zixiangluo/Desktop/testvasc/vasc.py", line 122, in vaeBuild logits = merge( [expr_x_drop_log,expr_x_nondrop_log],mode='concat',concat_axis=-1 ) TypeError: 'module' object is not callable

Process finished with exit code 1

henrique-a commented 4 years ago

You're using a newer version of tensorflow, you to have replace

logits = merge( [expr_x_drop_log,expr_x_nondrop_log],mode='concat',concat_axis=-1 )

by

logits = Concatenate(axis=-1)( [expr_x_drop_log,expr_x_nondrop_log] )

and replace

out = merge([expr_x, samples], mode='mul')

by

out = Multiply()([expr_x, samples])

Don't forget to import the layers: from keras.layers import Concatenate,Multiply