Skip to content

Commit 5e98b94

Browse files
committed
throw error if operation name is NoOp
1 parent 9ea9519 commit 5e98b94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/cppflow/model.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ namespace cppflow {
8989
if (!out_op.oper)
9090
throw std::runtime_error("No operation named \"" + operation + "\" exists");
9191

92+
if (operation == "NoOp")
93+
throw std::runtime_error("NoOp doesn't have a shape");
94+
9295
// DIMENSIONS
9396

9497
// Get number of dimensions

0 commit comments

Comments
 (0)