培训时,Google Cloud ML以非零状态退出245 [英] Google Cloud ML exited with a non-zero status of 245 when training

本文介绍了培训时,Google Cloud ML以非零状态退出245的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下示例代码在Google Cloud ML上训练模型:

I tried to train my model on Google Cloud ML using this sample code:

import keras
from keras import optimizers
from keras import losses
from keras import metrics
from keras.models import Model, Sequential
from keras.layers import Dense, Lambda, RepeatVector, TimeDistributed
import numpy as np

def test():
    model = Sequential()
    model.add(Dense(2, input_shape=(3,)))
    model.add(RepeatVector(3))
    model.add(TimeDistributed(Dense(3)))
    model.compile(loss=losses.MSE,
                  optimizer=optimizers.RMSprop(lr=0.0001),
                  metrics=[metrics.categorical_accuracy],
                  sample_weight_mode='temporal')
    x = np.random.random((1, 3))
    y = np.random.random((1, 3, 3))
    model.train_on_batch(x, y)

if __name__ == '__main__':
    test()

我得到这个错误:

and i got this error:

The replica master 0 exited with a non-zero status of 245. Termination reason: Error.

详细的错误输出很大,所以我正在粘贴这里是pastebin

Detailed error output is big, so i'm pasting it here in pastebin

推荐答案

问题已解决。我所要做的就是使用tensorflow 1.1.0,而不是默认的1.0.1

Problem is resolved. All I had to do is use tensorflow 1.1.0 instead default 1.0.1

这篇关于培训时,Google Cloud ML以非零状态退出245的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆