We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 327191c commit fee7ba3Copy full SHA for fee7ba3
core/conversion/evaluators/aten.cpp
@@ -182,14 +182,16 @@ auto aten_registrations TRTORCH_UNUSED =
182
auto tensor = tensor_var.ITensor();
183
auto dims = util::toVec(tensor->getDimensions());
184
auto nbDims = tensor->getDimensions().nbDims;
185
- if (dim < 0)
+ if (dim < 0) {
186
dim += nbDims;
187
+ }
188
return dims[dim];
189
} else {
190
auto tensor = tensor_var.unwrapToTensor();
191
auto nbDims = tensor.sizes().size();
192
193
194
195
return tensor.sizes()[dim];
196
}
197
0 commit comments