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"))