diff options
author | Frank Seide <fseide@microsoft.com> | 2019-02-13 00:55:54 +0300 |
---|---|---|
committer | Frank Seide <fseide@microsoft.com> | 2019-02-13 00:55:54 +0300 |
commit | 43e389d7c703b7c393ff12827121f869b1a1e472 (patch) | |
tree | 9a0c99a2b146644ebdf22666b54b3a05cf5ef704 /src/graph/node_operators_unary.h | |
parent | 699e48700d43104ce62894aadd211838fb648e62 (diff) |
bug fix: reshape() must verify that #elements does not change; bug fix: beam search must reshape first step correctly
Diffstat (limited to 'src/graph/node_operators_unary.h')
-rwxr-xr-x | src/graph/node_operators_unary.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h index 190fa947..c5141092 100755 --- a/src/graph/node_operators_unary.h +++ b/src/graph/node_operators_unary.h @@ -717,6 +717,8 @@ private: public: ReshapeNodeOp(Expr a, Shape shape) : UnaryNodeOp(a, shape, a->value_type()), reshapee_(a) { + ABORT_IF(a->shape().elements() != shape.elements(), + "Reshape must not change the number of elements (from {} to {})", a->shape().toString(), shape.toString()); Node::destroy_ = false; } |