This commit is contained in:
Gword 2020-07-14 17:59:27 +08:00
parent 928977cff0
commit 784d089c84
1 changed files with 0 additions and 7 deletions

View File

@ -17,13 +17,6 @@ namespace jittor {
static auto make_numpy_code = get_op_info("numpy_code")
.get_constructor<VarPtr, NanoVector, NanoString, vector<Var*>&&, NumpyFunc, NumpyResult&&>();
static inline void check_vary_shape(NanoVector v) {
ASSERT(v.size()) << "Vary shape should not be zero dimension";
for (int i=0; i<v.size(); i++)
ASSERT((i == 0) ^ (v[i] >= 0))
<< "Vary shape should only occur in the first dimension:" << v;
}
NumpyCodeOp::NumpyCodeOp(NanoVector shape, NanoString dtype, vector<Var*>&& inputs, NumpyFunc&& forward, vector<NumpyFunc>&& sbackward)
: _inputs(inputs), forward(move(forward))