System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Colab
- TensorFlow installed from (source or binary): -
- TensorFlow version (or github SHA if from source): 2.2
Command used to run the converter or code if you’re using the Python API
https://colab.research.google.com/drive/1IJWCGMZ9Wrf8C89oLJ_AWnGPH1ea4dma
converter = tf.lite.TFLiteConverter.from_keras_model(model)
The output from the converter invocation
AttributeError Traceback (most recent call last)
in ()
----> 1 converter = tf.lite.TFLiteConverter.from_keras_model(model)
1 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/saving_utils.py in model_input_signature(model, keep_original_batch_size)
75 TensorSpecs. This list does not contain the training argument.
76 """
---> 77 input_specs = model._get_save_spec(dynamic_batch=not keep_original_batch_size) # pylint: disable=protected-access
78 if input_specs is None:
79 return None
AttributeError: 'Sequential' object has no attribute '_get_save_spec'
Failure details
Fails to convert
Any other info / logs
When running the exact same code on a Windows 10 machine with TF2.1, the error is different :
D:\dev\Anaconda3\lib\site-packages\keras\engine\base_layer.py in call(self, inputs, **kwargs)
487 # Actually call the layer,
488 # collecting output(s), mask(s), and shape(s).
--> 489 output = self.call(inputs, **kwargs)
490 output_mask = self.compute_mask(inputs, previous_mask)
491
TypeError: call() got an unexpected keyword argument 'training'
System information
Command used to run the converter or code if you’re using the Python API
https://colab.research.google.com/drive/1IJWCGMZ9Wrf8C89oLJ_AWnGPH1ea4dma
converter = tf.lite.TFLiteConverter.from_keras_model(model)
The output from the converter invocation
AttributeError Traceback (most recent call last)
in ()
----> 1 converter = tf.lite.TFLiteConverter.from_keras_model(model)
1 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/saving_utils.py in model_input_signature(model, keep_original_batch_size)
75 TensorSpecs. This list does not contain the
trainingargument.76 """
---> 77 input_specs = model._get_save_spec(dynamic_batch=not keep_original_batch_size) # pylint: disable=protected-access
78 if input_specs is None:
79 return None
AttributeError: 'Sequential' object has no attribute '_get_save_spec'
Failure details
Fails to convert
Any other info / logs
When running the exact same code on a Windows 10 machine with TF2.1, the error is different :
D:\dev\Anaconda3\lib\site-packages\keras\engine\base_layer.py in call(self, inputs, **kwargs)
487 # Actually call the layer,
488 # collecting output(s), mask(s), and shape(s).
--> 489 output = self.call(inputs, **kwargs)
490 output_mask = self.compute_mask(inputs, previous_mask)
491
TypeError: call() got an unexpected keyword argument 'training'