tensorflow2.0.0关于警告:Skipping optimization due to error while loading function libraries

CSDN问答 2021-12-30 13:49:42 阅读数:298

Tensorflow 警告 2.0.0 skipping tensorflow2.0.0
问题遇到的现象和发生背景

之前跑LSTM还好好的,今天出现了这个警告,只是修改了损失函数和评估指标。

我的环境信息:
python3.7
tensorflow2.0.0 CPU
Windows10
模型 LSTM

问题相关代码,请勿粘贴截图

修改后的损失函数和评估指标如下。

parser.add_argument('--loss', type=str, default=tf.keras.losses.MeanSquaredError(), help="损失函数")parser.add_argument('--metrics', type=list, default=['mean_absolute_error'], help="评估指标")
运行结果及报错内容

警告代码如下:

2021-12-23 14:55:09.064595: W tensorflow/core/grappler/optimizers/implementation_selector.cc:310] Skipping optimization due to error while loading function libraries: Invalid argument: Functions '__inference___backward_standard_lstm_5423_5908_specialized_for_StatefulPartitionedCall_1_at___inference_distributed_function_6034' and '__inference___backward_cudnn_lstm_with_fallback_4067_4249' both implement 'lstm_f427eea4-2048-4997-9639-97d37bd6b022' but their signatures do not match.2021-12-23 14:55:10.132456: I tensorflow/core/profiler/lib/profiler_session.cc:184] Profiler session started.2021-12-23 14:55:38.443132: W tensorflow/core/grappler/optimizers/implementation_selector.cc:310] Skipping optimization due to error while loading function libraries: Invalid argument: Functions '__inference_cudnn_lstm_with_fallback_6571' and '__inference_standard_lstm_6460_specialized_for_sequential_lstm_StatefulPartitionedCall_at___inference_distributed_function_7293' both implement 'lstm_002ec12f-78d9-4b90-8a54-1874e0263d4c' but their signatures do not match.
问题

我如何在不修改tensorflow版本的条件下,解决该警告呢?




采纳答案:

上面说的意思是你传入参数无效,不知道你改的什么参数和函数


版权声明:本文为[CSDN问答]所创,转载请带上原文链接,感谢。 https://ask.csdn.net/questions/7613083