首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >[_Derived_]RecvAsync已取消

[_Derived_]RecvAsync已取消
EN

Stack Overflow用户
提问于 2020-09-18 07:32:34
回答 1查看 225关注 0票数 0

我已经有了这个错误,我已经做了几次更改,epochs = 100,50,我已经更改了batch_size,我已经更改了TensorFlow版本。但是我仍然不能解决这个问题。我用的是谷歌colab。

有人能帮我吗?

代码语言:javascript
复制
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))

它正在生成这个错误。

代码语言:javascript
复制
Epoch 1/20
---------------------------------------------------------------------------
CancelledError                            Traceback (most recent call last)
<ipython-input-17-c4f437a21b09> in <module>()
     19                   metrics=['accuracy', 'AUC', 'Recall', 'Precision'])
     20 # Fit the model
---> 21 model1.fit(x_train,y_train, epochs=20, batch_size=32, validation_data=(x_test, 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, attrs, 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
EN

回答 1

Stack Overflow用户

发布于 2021-01-04 21:31:55

我得到了同样的错误,我将LSTM层的数量从75层减少到10层,它起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63947374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档