Problems encountered
/home/optimizer-master/third_party/onnx_common/tensor.h:117: size_from_dim: Assertion dim >= 0 && (size_t)dim < sizes_.size() failed.
Problem description
When import onnx, I encountered the above problems
Solution:
If there is an op operation that cannot be exported during onnx export, this error will be reported
How to Solve:
find the operation that cannot be exported and add a judgment. If you export onnx, the op will not be used. An example is as follows
def forward(self, x):
if torch.onnx.is_in_onnx_export():# if onnx
return x * self.act(x)/6
else: # normally
return x * self.act(x + 3)/6
Read More:
- error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow‘
- [Solved] RuntimeError: each element in list of batch should be of equal size
- [Solved] Canal Error: CanalParseException: column size is not match,parse row data failed
- [Solved] MindSpore Error: ValueError: Minimum inputs size 0 does not match…
- [Solved] MindSpore Error: “RuntimeError: Invalid data, Page size.”
- error C4996: ‘pcl::SAC_SAMPLE_SIZE‘ [How to Solve]
- ValueError: Negative dimension size caused by subtracting 2 from 1 for…
- [HBase Error]“java.lang.OutOfMemoryError: Requested array size exceeds VM limit”
- [Solved] NPM install error: Maximum call stack size exceeded
- [Solved] the request was rejected because its size (11579386) exceeds the configured maximum (10485760)
- [Solved] sqoop Error: jSQLException in nextKeyValue Caused by: ORA-24920:column size too large for client
- NPM installation error Maximum call stack size exceeded
- Tensorflow error: InvalidArgumentError: indices[data_index] = data_value is not in [0, max_embedding_size)
- [Solved] Camera Calibration Error: ErrorMessage: Image size does not match the measurement in camera parameters
- Yolox_s.pth Convert to tensorRT Error: AttributeError: ‘tensorrt.tensorrt.Builder‘ object has no attribute ‘max_workspace_size‘
- [Solved] TFrecords Create Datas Error: Number of int64 values != expected. Values size: 1 but output shape: [3]
- [Solved] Keil Error: *** ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
- [Solved] ES Query SIZE too large Error: ENTITY CONTENT IS TOO LONG [105539255] FOR THE CONFIGURED BUFFER LIMIT [104857600]
- [Solved] KEIL Compile Error: Error: L6220E: Load region LR_IROM1 size (65552 bytes) exceeds limit (65536 bytes)……
- [Solved] Segyio Error: Runtime Error trace count inconsistent with file size, trace lengths … #401