File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -342,10 +342,9 @@ class InferShapeContext {
342
342
PADDLE_ENFORCE_LT (j, OutputSize (out));
343
343
auto * in_var = MultiInputVar (in)[i];
344
344
auto * out_var = MultiOutputVar (out)[j];
345
- PADDLE_ENFORCE (in_var->IsType <LoDTensor>(),
346
- " The %d-th input of Input(%s) must be LoDTensor." , in);
345
+ if (!in_var->IsType <LoDTensor>()) return ;
347
346
PADDLE_ENFORCE (out_var->IsType <LoDTensor>(),
348
- " The %d-th output of Output(%s) must be LoDTensor." , out);
347
+ " The %d-th output of Output(%s) must be LoDTensor." , j, out);
349
348
auto in_tensor = in_var->Get <LoDTensor>();
350
349
auto * out_tensor = out_var->GetMutable <LoDTensor>();
351
350
out_tensor->set_lod (in_tensor.lod ());
@@ -363,6 +362,13 @@ template <>
363
362
const std::vector<const Tensor*> InferShapeContext::MultiInput<Tensor>(
364
363
const std::string& name) const ;
365
364
365
+ template <>
366
+ Tensor* InferShapeContext::Output<Tensor>(const std::string& name) const ;
367
+
368
+ template <>
369
+ std::vector<Tensor*> InferShapeContext::MultiOutput<Tensor>(
370
+ const std::string& name) const ;
371
+
366
372
template <typename T>
367
373
struct EigenDeviceConverter ;
368
374
You can’t perform that action at this time.
0 commit comments