Internal fix on converter.
PiperOrigin-RevId: 336958737 Change-Id: I4e1b5983b1330e2aaef1cdb0a4058bada8732cae
This commit is contained in:
parent
c0b57b23be
commit
8572e0189a
@ -225,7 +225,8 @@ PyObject* CalibrationWrapper::SetTensor(int index, PyObject* value) {
|
||||
for (int j = 0; j < PyArray_NDIM(array); j++) {
|
||||
// Ensure the calibration data input shape is the same as the model input
|
||||
// shape unless the dimension is unknown.
|
||||
if (tensor->dims_signature->size == tensor->dims->size &&
|
||||
if (tensor->dims_signature != nullptr &&
|
||||
tensor->dims_signature->size == tensor->dims->size &&
|
||||
tensor->dims_signature->data[j] == -1) {
|
||||
has_unknown_dims = true;
|
||||
} else if (tensor->dims->data[j] != PyArray_SHAPE(array)[j]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user