You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to run the penultimate example of the "Scopes and when to use them" section like so:
image1=tf.placeholder(tf.float32, shape=[None, 100, 100, 3])
image2=tf.placeholder(tf.float32, shape=[None, 100, 100, 3])
features1=tf.layers.conv2d(image1, filters=32, kernel_size=3)
# Use the same convolution weights to process the second imagewithtf.variable_scope(tf.get_variable_scope(), reuse=True):
features2=tf.layers.conv2d(image2, filters=32, kernel_size=3)
conv1_weights=tf.get_variable('conv1_w', [3, 3, 3, 64])
features1=tf.nn.conv2d(image1, conv1_weights, strides=[1, 1, 1, 1], padding='SAME')
# Use the same convolution weights to process the second imagewithtf.variable_scope(tf.get_variable_scope(), reuse=True):
conv1_weights=tf.get_variable('conv1_w')
features2=tf.nn.conv2d(image2, conv1_weights, strides=[1, 1, 1, 1], padding='SAME')
and this does work (at least in terms of raising errors), but does not provide the segue to the final example (which uses tf.layers.conv2d).
Perhaps you know a way of modifying the current example so that it's runnable?
EDIT:
I should have added: my tf.__version__ is '1.6.0-rc0'
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. This looks like a newly introduced bug in TensorFlow that doesn't behave well with unnamed scopes. Naming the scope should resolve this. I updated the doc.
I've tried to run the penultimate example of the "Scopes and when to use them" section like so:
but I got:
So I tried:
and this does work (at least in terms of raising errors), but does not provide the segue to the final example (which uses
tf.layers.conv2d
).Perhaps you know a way of modifying the current example so that it's runnable?
EDIT:
I should have added: my
tf.__version__
is '1.6.0-rc0'The text was updated successfully, but these errors were encountered: