model = ResNet50(weights='imagenet', include_top=False, input_shape = (150, 150, 3), pooling = 'max')
final_output = Dense(264, activation = 'softmax')(model.output)
model = Model(inputs = model.input, outputs = final_output)
Это модель, которую я обучал в colab. Я попытался загрузить это в Kaggle, отображается ошибка: «Неизвестный уровень: Функциональный»
полная трассировка:
-------------------------------------------------- ------------------------- ValueError Traceback (последний вызов последним) в ---- ›1 model = tk.models.load_model ('. ./input/cornell-submission-model/resnet50_3.h5 ')
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py в load_model (filepath, custom_objects, compile) 182 if (h5py is not None и (183 isinstance (filepath, h5py .File) или h5py.is_hdf5 (путь к файлу))): - ›184 return hdf5_format.load_model_from_hdf5 (filepath, custom_objects, compile) 185 186, если sys.version_info› = (3, 4) и isinstance (путь к файлу, pathlib.Path) :
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py в load_model_from_hdf5 (путь к файлу, custom_objects, compile) 176 model_config = json.loads (model_config.decode ('utf-8 ')) 177 model = model_config_lib.model_from_config (model_config, - ›178 custom_objects = custom_objects) 179 180 # установить веса
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/model_config.py в model_from_config (config, custom_objects) 53 '
Sequential.from_config(config)
?') 54 из tensorflow.python.keras.layers import deserialize # pylint: disable = g-import-not-at-top --- ›55 return deserialize (config, custom_objects = custom_objects) 56 57/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/layers/serialization.py в десериализации (config, custom_objects) 107 module_objects = globs, 108 custom_objects = custom_objects, - ›109 printable_module_name = ' слой')
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/utils/generic_utils.py в deserialize_keras_object (идентификатор, module_objects, custom_objects, printable_module_name) 360 config = идентификатор 361 (clsrial, cls_config_config) = класс - ›362 config, module_objects, custom_objects, printable_module_name) 363 364 если hasattr (cls, 'from_config'):
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/utils/generic_utils.py в class_and_config_for_serialized_keras_object (config, module_objects, custom_objects, printable_module_name) 319 cls = get_registered_object cls равно None: - ›321 raise ValueError ('Неизвестно' + printable_module_name + ':' + class_name) 322 323 cls_config = config ['config']
ValueError: Неизвестный уровень: Функциональный
Пожалуйста, помогите мне с этим