File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1613,7 +1613,8 @@ DEFINE_BUILTIN_OP_IMPORTER(InstanceNormalization)
16131613 ASSERT (inputs.at (1 ).is_weights (), ErrorCode::kUNSUPPORTED_NODE );
16141614 ASSERT (inputs.at (2 ).is_weights (), ErrorCode::kUNSUPPORTED_NODE );
16151615 nvinfer1::ITensor* tensorPtr = &convertToTensor (inputs.at (0 ), ctx);
1616- ASSERT (!isDynamic (tensorPtr->getDimensions ()) && " InstanceNormalization does not support dynamic inputs!" ,
1616+ int nbDims = tensorPtr->getDimensions ().nbDims ;
1617+ ASSERT (nbDims >= 3 && nbDims <= 4 && " TensorRT only supports InstanceNormalization on 3D or 4D tensors!" ,
16171618 ErrorCode::kUNSUPPORTED_NODE );
16181619 auto scale_weights = inputs.at (1 ).weights ();
16191620 auto bias_weights = inputs.at (2 ).weights ();
You can’t perform that action at this time.
0 commit comments