You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tflite_model = converter.convert()
savepath = r'./model.tflite'
open(savepath, "wb").write(tflite_model)
the above is the code I used,how to resolve this error?
The text was updated successfully, but these errors were encountered:
when convert to tflite,the error of "call() got an unexpected keyword argument 'training'" appear,how to resolve it?
import tensorflow as tf
import keras
from keras.layers import BatchNormalization, ReLU
from keras.backend import pool2d
from utils import focal_loss
modelpath = r'./model/c3ae_model_v2.h5'
model = keras.models.load_model(modelpath, custom_objects={"pool2d": pool2d, "ReLU": ReLU,
"BatchNormalization": BatchNormalization, "tf": tf, "focal_loss_fixed": focal_loss([1] * 12)})
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
savepath = r'./model.tflite'
open(savepath, "wb").write(tflite_model)
the above is the code I used,how to resolve this error?
The text was updated successfully, but these errors were encountered: