We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d4b0c4 commit ca8d60aCopy full SHA for ca8d60a
pytensor/gradient.py
@@ -929,12 +929,7 @@ def account_for(var):
929
continue
930
931
if ipt not in var_to_app_to_idx:
932
- # This object here *must* be ordered, because
933
- # we iterate over its keys when adding up the terms of the
934
- # gradient on ipt. If it is a regular dict, the grad method
935
- # will return something that is analytically correct, but
936
- # whose order of doing additions depends on the memory
937
- # location of the apply nodes.
+ # This object *must* be ordered for the grad graph to be deterministic
938
var_to_app_to_idx[ipt] = {}
939
app_to_idx = var_to_app_to_idx[ipt]
940
if app not in app_to_idx:
0 commit comments