I am using the new version of tensorflow (2.0.0 alpha) and I dont know why it does not allow me to run:
tf.get_variable_scope().reuse_variables()
I am getting the following error:
AttributeError: module 'tensorflow' has no attribute 'get_variable_scope'
I guess there is a new attribute with a different name? Thanks!
From comments
No,
variable_scopeandget_variablehave been removed fromTensorFlow 2.x(although you can still find them under tf.compat.v1). InTF 2.xto returns the current variable scope you can usetf.compat.v1.get_variable_scopeinstead ofget_variable_scope. For more details please refer Migrate from TF1 to TF2. (paraphrased from jdehesa).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With