Skip to content

Commit 6cfb369

Browse files
add symbolic args changes as well
1 parent 51b7eda commit 6cfb369

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

keras/src/ops/symbolic_arguments.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ def fill_in(self, tensor_dict):
3636
if self._single_positional_tensor is not None:
3737
# Performance optimization for most common case.
3838
# Approx. 70x faster.
39-
return (tensor_dict[id(self._single_positional_tensor)],), {}
39+
return (tensor_dict.get(id(self._single_positional_tensor), None),), {}
4040

4141
def switch_fn(x):
4242
if isinstance(x, KerasTensor):
43-
return tensor_dict.get(id(x), None)
43+
result = tensor_dict.get(id(x), None)
44+
print(f"[DEBUG] SymbolicArguments.fill_in: tensor_id={id(x)}, result={result}")
45+
return result
4446
return x
4547

4648
return self.convert(switch_fn)

0 commit comments

Comments
 (0)