如何解决[_Derived_] RecvAsync已取消
我已经遇到此错误,我已经进行了几处更改,纪元= 100、50,已经更改了batch_size,已经更改了TensorFlow版本。但是我仍然无法解决这个问题。 我正在使用Google Colab。
有人可以帮助我吗?
model1 = Sequential()
model1.add(LSTM(units = 15,return_sequences = True,input_shape=(2167290,15)))
model1.add(Dropout(0.3))
model1.add(LSTM(units = 150,return_sequences = True))
model1.add(Dropout(0.3))
model1.add(LSTM(units = 100,return_sequences = True))
model1.add(Dropout(0.3))
model1.add(LSTM(units = 50,return_sequences = True))
model1.add(Dropout(0.3))
# Camada Final
model1.add(Dense(1,activation='sigmoid'))
# Compile model
model1.compile(optimizer = 'Adam',loss = 'mean_squared_error',metrics=['accuracy','AUC','Recall','Precision'])
# Fit the model
model1.fit(x_train,y_train,epochs=20,batch_size=32,validation_data=(x_test,y_test))
正在生成此错误。
Epoch 1/20
---------------------------------------------------------------------------
CancelledError Traceback (most recent call last)
<ipython-input-17-c4f437a21b09> in <module>()
19 metrics=['accuracy','Precision'])
20 # Fit the model
---> 21 model1.fit(x_train,y_test))
8 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name,num_outputs,inputs,attrs,ctx,name)
58 ctx.ensure_initialized()
59 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle,device_name,op_name,---> 60 inputs,num_outputs)
61 except core._NotOkStatusException as e:
62 if name is not None:
CancelledError: [_Derived_]RecvAsync is cancelled.
[[{{node ConstantFolding/assert_greater_equal_2/Assert/AssertGuard/switch_pred/_58_const_false/_113}}]] [Op:__inference_train_function_11454]
Function call stack:
train_function
解决方法
我遇到了同样的错误,我将 LSTM 层的数量从 75 层减少到 10 层,结果奏效了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。