Update to tensorflow 1.4
chinmaygghag opened this issue · 5 comments
chinmaygghag commented
Can this code be updated according to tensorflow 1.4?
mkj676 commented
Yes, You change this section
- tf.concat (ops.py)
- tf.sigmoid_~~~~(Face-Aging.py)
- In Tensorflow library, variable_scope.py -> def get_variable()'s parameter reuse = None -> reuse = AUTO_REUSE
AidasK commented
@mkj676 I have stuck with 3rd step. How can I set "reuse = AUTO_REUSE"?
My current error is "ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=tf.AUTO_REUSE in VarScope?"
AidasK commented
Managed to make it work by setting
with tf.variable_scope('', reuse=tf.AUTO_REUSE):
on line 222 of Face-Aging.py
So it looks like this:
with tf.variable_scope('', reuse=tf.AUTO_REUSE):
# optimizer for encoder + generator
self.EG_optimizer = tf.train.AdamOptimizer(
learning_rate=EG_learning_rate,
beta1=beta1
).minimize(
loss=self.loss_EG,
global_step=self.EG_global_step,
var_list=self.E_variables + self.G_variables
)
# optimizer for discriminator on z
self.D_z_optimizer = tf.train.AdamOptimizer(
learning_rate=EG_learning_rate,
beta1=beta1
).minimize(
loss=self.loss_Dz,
var_list=self.D_z_variables
)
# optimizer for discriminator on image
self.D_img_optimizer = tf.train.AdamOptimizer(
learning_rate=EG_learning_rate,
beta1=beta1
).minimize(
loss=self.loss_Di,
var_list=self.D_img_variables
)
mkj676 commented
@AidasK
No, you have to change this code
ex) For me, /home/flask/lib/python2.7/site-packages/tensorflow/python/ops
ps. flask means virtualenv
praveenkumarchandaliya commented
Problem no 1 and 2 is not clear. where we change or which file we required to changes?