Skip to content

Commit

Permalink
Attempt to make t3f.get_variable work in eager mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AustenLamacraft committed Mar 2, 2018
1 parent df51688 commit e68a996
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t3f/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_variable(name,
raise ValueError('Scope reuse is False and initializer is not provided.')

variable_cores = []
if reuse:
if reuse is True:
# Find an existing variable in the collection.
path = tf.get_variable_scope().name
if path != '' and path[-1] != '/':
Expand All @@ -69,8 +69,8 @@ def get_variable(name,
break
if found_v is None:
raise ValueError('ValueError: Variable %s does not exist, or was not '
'created with t3f.get_tt_variable(). Did you mean to '
'set reuse=None in VarScope?' % name)
'created with t3f.get_variable(). Did you mean to '
'set reuse=False or reuse=tf.AUTO_REUSE in VarScope?' % name)
with tf.variable_scope(name):
# Try to get the first core through tf.get_variable to check that we don't
# violate reuse: it will raise a ValueError otherwise.
Expand Down

0 comments on commit e68a996

Please sign in to comment.