matsengrp / vampire

🧛 Deep generative models for TCR sequences 🧛
Apache License 2.0
16 stars 4 forks source link

reinitialize_weights not compatible with tensorflow2 #123

Closed tdw1221 closed 4 years ago

tdw1221 commented 4 years ago

I'm running into an issue when trying to replicate the following demo code:

cr-vae train model_params.json _output_demo/train.processed.csv _output_demo/best_weights.h5 _output_demo/diagnostics.csv
The first error I got looks like: 
File "/anaconda/envs/vampire/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 379, in get_session
    '`get_session` is not available '
RuntimeError: `get_session` is not available when using TensorFlow 2.0.

Then when I replace session = K.get_session() with session = tf.compat.v1.keras.backend.get_session(), I got another error saying:

layer.kernel.initializer.run(session=session)
AttributeError: 'NoneType' object has no attribute 'run'
matsen commented 4 years ago

Sorry, but this repo uses TF1, and I don't foresee converting it to TF2. We've moved on.