Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow 2.x Compatibility #2

Open
kevin931 opened this issue May 25, 2021 · 0 comments
Open

Tensorflow 2.x Compatibility #2

kevin931 opened this issue May 25, 2021 · 0 comments

Comments

@kevin931
Copy link

Issue

There appears to be a compatibility issue with tensorflow 2.x because the contrib library has been removed. Here is the error I got:

Traceback (most recent call last):
  File "/home/kevin/anaconda3/envs/cytof/bin/scvis", line 8, in <module>
    from scvis.run import train, map
  File "/home/kevin/anaconda3/envs/cytof/lib/python3.8/site-packages/scvis/run.py", line 9, in <module>
    from scvis.model import SCVIS
  File "/home/kevin/anaconda3/envs/cytof/lib/python3.8/site-packages/scvis/model.py", line 8, in <module>
    from scvis.vae import GaussianVAE
  File "/home/kevin/anaconda3/envs/cytof/lib/python3.8/site-packages/scvis/vae.py", line 2, in <module>
    from scvis.tf_helper import weight_xavier_relu, bias_variable, shape
  File "/home/kevin/anaconda3/envs/cytof/lib/python3.8/site-packages/scvis/tf_helper.py", line 3, in <module>
    X_INIT = tf.contrib.layers.xavier_initializer()
AttributeError: module 'tensorflow' has no attribute 'contrib'

My Setup

  • OS: WSL Ubuntu 20.04
  • Python version and runtime: 3.8.8 (in a conda envrionment)
  • TensorFlow version: 2.4.1
  • scvis version: 0.1.0 (bioconda)

Some thoughts on fixes

A trivial, temporary fix will be to change the version requirement in setup.py and the yaml for bioconda distribution. I have not looked into the source code so I cannot comment on how difficult it will be upgrade and maintain compatibility with tensorflow 1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant