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

Comparison of tuples of namedtensors yields true #101

Open
samgoldman97 opened this issue May 9, 2019 · 0 comments
Open

Comparison of tuples of namedtensors yields true #101

samgoldman97 opened this issue May 9, 2019 · 0 comments

Comments

@samgoldman97
Copy link
Contributor

I tried to compare the hidden state returned by an LSTM to a saved copy of the state previously to make sure the LSTM was not changing the state. Curiously, comparing the two hidden state tuples yielded True. I checked generally, and it seems that checking equality for tuples of named tensors always returns True. Here's an example:

(ntorch.randn((6,7), names=("dim2", "dim3")), ntorch.randn(5, names="dim1")) == (ntorch.randn(5, names="dim1"), ntorch.randn(5, names="dim1"))

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