I have created a custom neural network structure that I have changed to tflite. I want to train in using new data on device by using the ‘create’ functionality as follow:
converter = tf.lite.TFLiteConverter.from_keras_model(model) # using the custom structured ‘model’
lite_model = converter.convert() # converting to tflite format
new_model = lite_model.create(x_train[0:tr_samples], y_train[0:tr_samples]) #using ‘create’ function to retrain
However, when I run the above code, I get the following error:
"
AttributeError Traceback (most recent call last)
in
1 converter = tf.lite.TFLiteConverter.from_keras_model(model)
2 lite_model = converter.convert()
----> 3 new_model = lite_model.create(x_train[0:tr_samples], y_train[0:tr_samples])
AttributeError: ‘bytes’ object has no attribute ‘create’
"
Can anyone please explain how tackle this issue or how to retrain my own model (converted to tflite) again on a destination device (using python)