Open keenhl opened 1 year ago
I redid with a different configuration of of TensorFlow and Python thinking that might help. I still get the same error.
TensorFlow v2.11.0 (~/opt/miniconda3/envs/tf3/lib/python3.7/site-packages/tensorflow) Python v3.7 (~/opt/miniconda3/envs/tf3/bin/python)
Error in py_get_attr_impl(x, name, silent) : AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
If I do this as suggested at the link. tf$reset_default_graph <- tf$compat$v1$reset_default_graph
https://github.com/rstudio/keras/issues/890
I get the following error
AttributeError: module 'tensorflow' has no attribute 'contrib'
I redid with a third different configuration of of TensorFlow and Python thinking that might help. I still get the same error.
TensorFlow v2.1.0 () Python v3.6 (~/Library/r-miniconda/envs/r-reticulate/bin/python)
Error in py_get_attr_impl(x, name, silent) : AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
I added the two commands and the error was fixed.
tf$reset_default_graph <- tf$compat$v1$reset_default_graph
tf$contrib <- tf$compat$v1$estimator
But now I meet new issues,
fit <- cellassign(exprs_obj = sce[rownames(rho),], marker_gene_info = rho, learning_rate = 1e-2, s = s, shrinkage = TRUE, verbose = FALSE)
Error in py_get_attr_impl(x, name, silent): AttributeError: module 'tensorflow.api.v2.compat.v2.__internal_\' has no attribute 'monitoring'
Traceback:
My tensorflow version is 2.4.1, the numpy version is 1.23 and tensorflow-probability version is 1.12.0. All the packages are installed under the website's guide, and I don't know where is the problem?
I have Tensorflow installed. When I check the version, it is 2.12.
tensorflow::tf_config()
2023-02-27 15:55:21.780906: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. TensorFlow v2.12.0-rc0 (~/opt/miniconda3/envs/tf/lib/python3.11/site-packages/tensorflow) Python v3.11 (~/opt/miniconda3/envs/tf/bin/python)
When I try to run
fit <- cellassign(exprs_obj = gexp, marker_gene_info = markers, s = s, learning_rate = 1e-2, shrinkage = TRUE, verbose = FALSE)
I get this error.
Error in py_get_attr_impl(x, name, silent) : AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
Thank you for your help trying to figure out this error.