Skip to content
New issue

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

Minor issue with name scopes #40

Closed
ameroyer opened this issue Jan 29, 2019 · 1 comment
Closed

Minor issue with name scopes #40

ameroyer opened this issue Jan 29, 2019 · 1 comment

Comments

@ameroyer
Copy link

ameroyer commented Jan 29, 2019

Hello,
I've noticed a minor issue when using name scopes (mostly for Tensorboard visualization). For instance the following code raises an error in the utils.var_scope wrapper:

with tf.name_scope('A'):
        with tf.variable_scope('B'):
            x = tf.placeholder(shape=(None, 1024, 1024, 3), dtype=tf.float32)
            y = tensornets.MobileNet100(x, stem=True)

It seems the problem comes from line 243 where _scope = tf.get_variable_scope().name only looks at variable scope while the tf.get_collection(..., scope=_scope) at line 124 look through variable names.
It can be solved by replacing line 243 with _scope = tf.contrib.framework.get_name_scope(), but I'm not sure if it's the best workaround.

@taehoonlee
Copy link
Owner

Thank you for the report, @ameroyer.

  1. Fix: ae8e431
  2. Notes: Notes for variable_scope, name_scope, and weight sharing #43
  3. Test codes: b1c2533

If you want to use the latest version, you can try pip install -U tensornets. Please feel free to open it again at any time if you have additional comments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants