yunjey / domain-transfer-network

TensorFlow Implementation of Unsupervised Cross-Domain Image Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Value Error in --mode='train'

ArjunAhuja-git opened this issue · comments

I was trying your code on A Mac OS machine and I got this error in python 2.7:

ValueError: Variable discriminator/conv1/weights/Adam/ already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File "/Users/arjun/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 467, in create_train_op
grad_updates = optimizer.apply_gradients(grads, global_step=global_step)
File "/Users/arjun/dtn-tensorflow/model.py", line 129, in build_model
self.d_train_op_src = slim.learning.create_train_op(self.d_loss_src, self.d_optimizer_src, variables_to_train=d_vars)
File "/Users/arjun/dtn-tensorflow/solver.py", line 112, in train
model.build_model()

Can you look into the issue as I am new to tensor flow,I could not point this out.

get same error. @ArjunAhuja95 , do you solve it?

line 128 and 162 in the model.py

with tf.name_scope('source_train_op') modifies to
with tf.variable_scope('source_train_op',reuse=False):

with tf.name_scope('target_train_op') modifes to
with tf.variable_scope('target_train_op',reuse=False):

made changes based on SrCMpink's comment, then got resource exhausted: OOM issue. Anyone know how to solve this?

@cindycfeng This code load all data into memory at once, so you need more memory to run this model

@cindycfeng Try to run it on google colabs. You will have access to more RAM and memory.