Skip to content

Name scope is being ignored while creating a variable #10038

@partarstu

Description

@partarstu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions