@@ -1002,8 +1002,9 @@ def __call__(self, *args, **kwargs):
10021002 # if we are allowing garbage collection, remove the
10031003 # output reference from the internal storage cells
10041004 if getattr (self .vm , "allow_gc" , False ):
1005+ # strict=False because we are in a hot loop
10051006 for o_container , o_variable in zip (
1006- self .output_storage , self .maker .fgraph .outputs , strict = True
1007+ self .output_storage , self .maker .fgraph .outputs , strict = False
10071008 ):
10081009 if o_variable .owner is not None :
10091010 # this node is the variable of computation
@@ -1012,8 +1013,9 @@ def __call__(self, *args, **kwargs):
10121013
10131014 if getattr (self .vm , "need_update_inputs" , True ):
10141015 # Update the inputs that have an update function
1016+ # strict=False because we are in a hot loop
10151017 for input , storage in reversed (
1016- list (zip (self .maker .expanded_inputs , input_storage , strict = True ))
1018+ list (zip (self .maker .expanded_inputs , input_storage , strict = False ))
10171019 ):
10181020 if input .update is not None :
10191021 storage .data = outputs .pop ()
@@ -1044,7 +1046,8 @@ def __call__(self, *args, **kwargs):
10441046 assert len (self .output_keys ) == len (outputs )
10451047
10461048 if output_subset is None :
1047- return dict (zip (self .output_keys , outputs , strict = True ))
1049+ # strict=False because we are in a hot loop
1050+ return dict (zip (self .output_keys , outputs , strict = False ))
10481051 else :
10491052 return {
10501053 self .output_keys [index ]: outputs [index ]
@@ -1111,8 +1114,9 @@ def _pickle_Function(f):
11111114 ins = list (f .input_storage )
11121115 input_storage = []
11131116
1117+ # strict=False because we are in a hot loop
11141118 for (input , indices , inputs ), (required , refeed , default ) in zip (
1115- f .indices , f .defaults , strict = True
1119+ f .indices , f .defaults , strict = False
11161120 ):
11171121 input_storage .append (ins [0 ])
11181122 del ins [0 ]
0 commit comments