gpt4 book ai didi

TensorFlow Lite : Init node doesn't exist

转载 作者:行者123 更新时间:2023-12-03 00:25:12 24 4
gpt4 key购买 nike

我尝试使用以下代码将 Keras 文件 (.h5) 中的模型转换为 TensorFlow Lite 文件 (.tflite):

# Save model as .h5 keras file
keras_file = "eSleep.h5"
model_save = tf.keras.models.save_model(model,keras_file,overwrite=True,include_optimizer=True)

# Export keras file to TensorFlow Lite model
converter = tf.lite.TFLiteConverter.from_keras_model_file(keras_file)
tflite_model = converter.convert()
open("eSleep.tflite", "wb").write(tflite_model)

但是,以下行:

tflite_model = converter.convert()

返回错误:

I tensorflow/core/grappler/devices.cc:53] Number of eligible GPUs (core count >= 8): 0 (Note: TensorFlow was not compiled with CUDA support)
I tensorflow/core/grappler/clusters/single_machine.cc:359] Starting new session
E tensorflow/core/grappler/grappler_item_builder.cc:636] Init node dense/kernel/Assign doesn't exist in graph

任何人都可以帮助我理解“图中不存在初始化节点密集/内核/分配”的含义以及如何修复错误吗?

最佳答案

根据我的经验,即使显示此错误,转换后的模型也应该可以正常工作。您可以忽略该错误。

关于TensorFlow Lite : Init node doesn't exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54122044/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com