Closed Yolanda-HT closed 3 years ago
I tried dca in scanpy pipeline in python 3.8 environment and got this error:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-21-9bb00469e9a1> in <module> 1 ###----- DCA denoising ----> 2 dca(adata) ~/anaconda3/envs/sc_py3.8/lib/python3.8/site-packages/dca/api.py in dca(adata, mode, ae_type, normalize_per_cell, scale, log1p, hidden_size, hidden_dropout, batchnorm, activation, init, network_kwds, epochs, reduce_lr, early_stop, batch_size, optimizer, learning_rate, random_state, threads, verbose, training_kwds, return_model, return_info, copy) 147 random.seed(random_state) 148 np.random.seed(random_state) --> 149 tf.set_random_seed(random_state) 150 os.environ['PYTHONHASHSEED'] = '0' 151 AttributeError: module 'tensorflow' has no attribute 'set_random_seed'
you are using tensorflow 2, wheretf.random.set_seed() is used. See this one https://github.com/tensorflow/tensorflow/issues/30070 dca should with pip install tensorflow==1.15
tf.random.set_seed()
pip install tensorflow==1.15
I tried dca in scanpy pipeline in python 3.8 environment and got this error: