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

Name scope is being ignored while creating a variable #10038

Open
partarstu opened this issue Oct 12, 2023 · 0 comments
Open

Name scope is being ignored while creating a variable #10038

partarstu opened this issue Oct 12, 2023 · 0 comments

Comments

@partarstu
Copy link
Contributor

partarstu commented Oct 12, 2023

Issue Description

  • Expected behavior : if I call org.nd4j.autodiff.samediff.SameDiff#var(java.lang.String, org.nd4j.linalg.api.ndarray.INDArray) inside different name scopes, it should work.
  • Actual behavior : if I call org.nd4j.autodiff.samediff.SameDiff#var(java.lang.String, org.nd4j.linalg.api.ndarray.INDArray) inside different name scopes, it fails with java.lang.IllegalArgumentException: Another variable with the name "..." already exists..

Version Information

  • Deeplearning4j version - SNAPSHOT-1.0.0
  • Platform information - Windows 11
  • CUDA version - N/A
  • NVIDIA driver version - N/A

Additional Information

Seems like the method which fails does not re-use the logic in org.nd4j.autodiff.samediff.SameDiff#var(java.lang.String, org.nd4j.autodiff.samediff.VariableType, org.nd4j.weightinit.WeightInitScheme, org.nd4j.linalg.api.buffer.DataType, long...) which takes into account the name scopes.

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

1 participant