Advertisement
Guest User

Untitled

a guest
Sep 12th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. RuntimeError Traceback (most recent call last)
  2. <ipython-input-4-00def698b3cd> in <module>()
  3. 23
  4. 24 converter.optimizations = [tf.lite.Optimize.DEFAULT]
  5. ---> 25 tflite_model = converter.convert()
  6. 26
  7. 27 tflite_filename = model_checkpoint_name + "_" + quantization_strategy + ".tflite"
  8.  
  9. 3 frames
  10. /usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/lite.py in convert(self)
  11. 1916 None value for dimension in input_tensor.
  12. 1917 """
  13. -> 1918 return super(TFLiteConverter, self).convert()
  14. 1919
  15. 1920
  16.  
  17. /usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/lite.py in convert(self)
  18. 1283
  19. 1284 if calibrate_quantize:
  20. -> 1285 result = self._calibrate_quantize_model(result, **flags)
  21. 1286
  22. 1287 if self._experimental_sparsify_model:
  23.  
  24. /usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/lite.py in _calibrate_quantize_model(self, result, inference_input_type, inference_output_type, activations_type, allow_float)
  25. 474 return calibrate_quantize.calibrate_and_quantize(
  26. 475 self.representative_dataset.input_gen, inference_input_type,
  27. --> 476 inference_output_type, allow_float, activations_type)
  28. 477
  29. 478 def _is_unknown_shapes_allowed(self):
  30.  
  31. /usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/optimize/calibrator.py in calibrate_and_quantize(self, dataset_gen, input_type, output_type, allow_float, activations_type, resize_input)
  32. 96 np.dtype(input_type.as_numpy_dtype()).num,
  33. 97 np.dtype(output_type.as_numpy_dtype()).num, allow_float,
  34. ---> 98 np.dtype(activations_type.as_numpy_dtype()).num)
  35. 99
  36. 100 def calibrate_and_quantize_single(self,
  37.  
  38. RuntimeError: Mismatch between number of weight maxs and channels: 1 vs 32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement