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 ac15c7d commit 76bd715Copy full SHA for 76bd715
src/qonnx/analysis/topology.py
@@ -56,7 +56,10 @@ def all_tensors_f32(model):
56
annotations notwithstanding.
57
58
Returns {"all_tensors_f32": Bool}."""
59
- all_tensors = model.make_empty_exec_context().items()
+ exec_ctx = model.make_empty_exec_context()
60
+ # remove the special empty string entry in the context since it has no tensor
61
+ exec_ctx.pop("")
62
+ all_tensors = exec_ctx.items()
63
non_f32_tensors = filter(lambda x: x[1].dtype != np.float32, all_tensors)
64
return {"all_tensors_f32": len(list(non_f32_tensors)) == 0}
65
0 commit comments