@alefiasolar I’ve looked at it and cannot pinpoint why this is. Training seems OK, but executing fails with:
Input to reshape is a tensor with 7865 values, but the requested shape has 8004 [Op:Reshape]
Profiling int8 model...
Traceback (most recent call last):
File "./resources/libraries/ei_tensorflow/profiling.py", line 396, in get_model_metadata
float32_perf = profile_tflite_model(model_type, model_float32, file_float32, validation_dataset, Y_test, X_samples, Y_samples, has_samples, memory, mode, prepare_model_tflite_script, prepare_model_tflite_eon_script, len(class_names))
File "./resources/libraries/ei_tensorflow/profiling.py", line 130, in profile_tflite_model
feature_explorer_predictions = tflite_predict(model, X_samples, len(Y_samples))
File "./resources/libraries/ei_tensorflow/profiling.py", line 39, in tflite_predict
item_as_tensor = tf.reshape(item_as_tensor, input_details[0]['shape'])
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 195, in reshape
result = gen_array_ops.reshape(tensor, shape, name)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 8224, in reshape
_ops.raise_from_not_ok_status(e, name)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 6843, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 7865 values, but the requested shape has 8004 [Op:Reshape]
Unable to execute TensorFlow Lite int8 model:
Input to reshape is a tensor with 7865 values, but the requested shape has 8004 [Op:Reshape]
Traceback (most recent call last):
File "./resources/libraries/ei_tensorflow/profiling.py", line 428, in get_model_metadata
int8_perf = profile_tflite_model(model_type, model_int8, file_int8, validation_dataset, Y_test, X_samples, Y_samples, has_samples, memory, mode, prepare_model_tflite_script, prepare_model_tflite_eon_script, len(class_names))
File "./resources/libraries/ei_tensorflow/profiling.py", line 130, in profile_tflite_model
feature_explorer_predictions = tflite_predict(model, X_samples, len(Y_samples))
File "./resources/libraries/ei_tensorflow/profiling.py", line 39, in tflite_predict
item_as_tensor = tf.reshape(item_as_tensor, input_details[0]['shape'])
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 195, in reshape
result = gen_array_ops.reshape(tensor, shape, name)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 8224, in reshape
_ops.raise_from_not_ok_status(e, name)
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 6843, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 7865 values, but the requested shape has 8004 [Op:Reshape]
@dansitu Any idea? I’ve added you to 17583.