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
The current dispose scope system does not support async and may have other problems when being misused by users.
So would it be a better idea to have something like:
usingvarscope=newScope();varx=scope.Tensor(0);
And things like y = x + 1 could automatically attach y to the same scope of x. (And tensor(1) should be directly disposed after the operation.) Hmm... and for z = x + y... maybe we should dispose z when x.scope and y.scope are both disposed.
Actually I got the idea from a comment of this post, and I think the only reason we don't do this is that it may lead to inconsistency with pytorch. But I still believe this is a really good idea.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current dispose scope system does not support
asyncand may have other problems when being misused by users.So would it be a better idea to have something like:
And things like
y = x + 1could automatically attachyto the same scope ofx. (Andtensor(1)should be directly disposed after the operation.) Hmm... and forz = x + y... maybe we should disposezwhenx.scopeandy.scopeare both disposed.Actually I got the idea from a comment of this post, and I think the only reason we don't do this is that it may lead to inconsistency with pytorch. But I still believe this is a really good idea.
Beta Was this translation helpful? Give feedback.
All reactions