'How to solve the old tensorflow problems
The code is done with tensorflow (old version) and should stay like this because it is too big to manipulate
import re
all_variables = tf.**contrib**.estimator.framework.get_variables('DehazeNet')
variables_to_be_trained = tf.contrib.framework.get_variables('DehazeNet/final')
pre_trained_variables = [x for x in all_variables if re.match(r'DehazeNet/final.*', x.name) == None]
print(len(variables_to_be_trained))
print(len(pre_trained_variables))
print(all_variables)
print(len(tf.compat.v1.trainable_variables()))```
Error:
AttributeError: module 'tensorflow' has no attribute '**contrib**'
any suggestion please
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
