We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In 'Scopes and when to use them` section
with tf.variable_scope("scope", reuse=tf.AUTO_REUSE): features1 = tf.layers.conv2d(image1, filters=32, kernel_size=3) features2 = tf.layers.conv2d(image2, filters=32, kernel_size=3)
The above conv2d layer won't share weights, it seems that we have to explicitly specify name attribute of tf.layers.conv2d to share weights like,
tf.layers.conv2d
with tf.variable_scope("scope", reuse=tf.AUTO_REUSE): features1 = tf.layers.conv2d(image1, filters=32, kernel_size=3, name='conv2d') features2 = tf.layers.conv2d(image2, filters=32, kernel_size=3, name='conv2d')
tf.version = 1.8.0
Thanks
The text was updated successfully, but these errors were encountered:
Thanks for finding this. Fixed.
Note that the reason this doesn't work is because of the counter in the variable_scope. The following should work:
with tf.variable_scope("scope", reuse=tf.AUTO_REUSE): features1 = tf.layers.conv2d(image1, filters=32, kernel_size=3) with tf.variable_scope("scope", reuse=tf.AUTO_REUSE): features2 = tf.layers.conv2d(image2, filters=32, kernel_size=3)
Sorry, something went wrong.
No branches or pull requests
In 'Scopes and when to use them` section
The above conv2d layer won't share weights, it seems that we have to explicitly specify name attribute of
tf.layers.conv2d
to share weights like,tf.version = 1.8.0
Thanks
The text was updated successfully, but these errors were encountered: