You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
From an old version of the README, this usage is now not working as expected.
There seem to be old references being cached (X.numpy() != X.to(N).numpy())
import loop_tool as lt
import numpy as np
N, K = lt.Symbol("N"), lt.Symbol("K")
X = lt.Tensor(np.random.randn(128)).to(N)
Z = lt.Tensor(K)
W = (Z.to(N) * X.to(N)).sum(N)
W.unify()
Z.set(np.random.randn(Z.shape[0]))
k = np.sum(Z.numpy() * X.numpy())
assert np.allclose(W.numpy(), np.sum(X.numpy() * Z.numpy()))
[Followup to issue #6 (thanks tcoard for filing)]
From an old version of the README, this usage is now not working as expected.
There seem to be old references being cached (
X.numpy() != X.to(N).numpy())