Skip to content

Commit 2794413

Browse files
committed
Report which tensors are missing shape info
1 parent 3068bf5 commit 2794413

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Deeploy/DeeployTypes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,8 +3429,9 @@ def _removeIdentityNodes(self):
34293429
self.graph.deleteNode(node)
34303430

34313431
def _assertTensorsHaveShape(self) -> None:
3432-
for tensor in self.graph.tensors().values():
3433-
assert tensor.shape is not None, f"Tensors are expected to have shape. Shape inference not supported."
3432+
missingShapes = [name for name, tensor in self.graph.tensors().items() if tensor.shape is None]
3433+
assert len(missingShapes) == 0, \
3434+
f"Shape inference is not supported.\nFound tensors with missing shape annotation: {missingShapes}"
34343435

34353436
def frontEnd(self):
34363437
"""API hook to prepare the graph to be deployed and build the initial NetworkContext

0 commit comments

Comments
 (0)