gpt4 book ai didi

python - 副本主机 0 以非零状态 1 退出

转载 作者:太空宇宙 更新时间:2023-11-03 14:14:25 25 4
gpt4 key购买 nike

我的代码在本地计算机上完全正常,但是当我在谷歌云存储上运行它时,它会抛出以下异常(以前它也可以在谷歌云上运行)。有谁知道是什么原因吗?

 "The replica master 0 exited with a non-zero status of 1. Termination reason: Error. 
Traceback (most recent call last):\n [...]\n File \"/root/.local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py\", line 1001, in moving_average_update
x, value, momentum, zero_debias=True)
File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py\", line 70, in assign_moving_average
update_delta = _zero_debias(variable, value, decay)
File \"/usr/local/lib/python2.7/dist packages/tensorflow/python/training/moving_averages.py\", line 180, in _zero_debias
\"biased\", initializer=biased_initializer, trainable=False)\n File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 988, in get_variable
custom_getter=custom_getter)\n File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 890, in get_variable\n custom_getter=custom_getter)
File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 348, in get_variable\n validate_shape=validate_shape)\n File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 333, in _true_getter\n caching_device=caching_device, validate_shape=validate_shape)


File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 639, in _get_single_variable\n name, \"\".join(traceback.format_list(tb))))\nValueError: Variable batch_normalization_1/moving_mean/biased already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File \"/root/.local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py\", line 1001, in moving_average_update
x, value, momentum, zero_debias=True)
File \"/root/.local/lib/python2.7/site-packages/keras/layers/normalization.py\", line 185, in call
self.momentum),
File \"/root/.local/lib/python2.7/site-packages/keras/engine/topology.py\", line 617, in __call__
output = self.call(inputs, **kwargs)
To find out more about why your job exited please check the logs: https://console.cloud.google.com/logs/viewer?

最佳答案

正如@Idavid指出的那样,出现此问题的原因是本地软件包之间不兼容。这是简单的解决方案:

from setuptools import setup, find_packages

setup(name='Awesome project',
version='1.0',
packages=find_packages(),
include_package_data=True,
description='Awesome project',
author='Hadifar',
author_email='Your_email@gmail.com',
license='MIT',
install_requires=[
'keras==2.1.3',
'numpy==1.14.1',
'scipy==1.0.0',
'tensorflow==1.4.1',
'sklearn==0.19.1',
'h5py==2.7.1'],
zip_safe=False)

确保本地包和云包相同。

关于python - 副本主机 0 以非零状态 1 退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48285212/

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