简体   繁体   English

numpy.core._exceptions.MemoryError:无法为形状为 (1073741824, 0) 且数据类型为 float32 的数组分配 0 个字节

[英]numpy.core._exceptions.MemoryError: Unable to allocate 0 bytes for an array with shape (1073741824, 0) and data type float32

I'm trying to train StyleGAN2 , but everytime I'm starting to train I'm getting this error.我正在尝试训练StyleGAN2 ,但每次我开始训练时都会遇到此错误。 It's weird that it can't allocate 0 bytes.奇怪的是它不能分配 0 字节。

Log:日志:

Traceback (most recent call last):
  File "train.py", line 561, in <module>
    main()
  File "train.py", line 553, in main
    run_training(**vars(args))
  File "train.py", line 416, in run_training
    run_desc, training_options = setup_training_options(**hyperparam_options)
  File "train.py", line 105, in setup_training_options
    dataset_obj = dataset.load_dataset(**args.train_dataset_args) # try to load the data and see what comes out
  File "C:\Temporary Software\stylegan2-ada\training\dataset.py", line 231, in load_dataset
    mirror_augment=mirror_augment, repeat=repeat, shuffle=shuffle)
  File "C:\Temporary Software\stylegan2-ada\training\dataset.py", line 114, in __init__
    self._tf_labels_var = tflib.create_var_with_large_initial_value(self._np_labels, name='labels_var')
  File "C:\Temporary Software\stylegan2-ada\dnnlib\tflib\tfutil.py", line 234, in create_var_with_large_initial_value
    zeros = tf.zeros(initial_value.shape, initial_value.dtype)
  File "C:\Users\Andrew\anaconda3\envs\stylegan\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1871, in zeros
    output = _constant_if_small(zero, shape, dtype, name)
  File "C:\Users\Andrew\anaconda3\envs\stylegan\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1829, in _constant_if_small
    return constant(value, shape=shape, dtype=dtype, name=name)
  File "C:\Users\Andrew\anaconda3\envs\stylegan\lib\site-packages\tensorflow\python\framework\constant_op.py", line 246, in constant
    allow_broadcast=True)
  File "C:\Users\Andrew\anaconda3\envs\stylegan\lib\site-packages\tensorflow\python\framework\constant_op.py", line 284, in _constant_impl
    allow_broadcast=allow_broadcast))
  File "C:\Users\Andrew\anaconda3\envs\stylegan\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 464, in make_tensor_proto
    nparray = np.empty(shape, dtype=np_dt)
numpy.core._exceptions.MemoryError: Unable to allocate 0 bytes for an array with shape (1073741824, 0) and data type float32

Is it a numpy bug or I'm doing something wrong?这是一个麻木的错误还是我做错了什么? I'd be very much appreciated if you could help me如果您能帮助我,我将不胜感激

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MemoryError: 无法分配形状为 (2515, 406272) 且数据类型为 float32 的数组 - MemoryError: Unable to allocate array with shape (2515, 406272) and data type float32 MemoryError:在python中使用word2vec时无法分配形状和数据类型为float32的数组 - MemoryError: unable to allocate array with shape and data type float32 while using word2vec in python MemoryError: Unable to allocate 137. MiB for an array with shape (3000, 4000, 3) and data type float32 - MemoryError: Unable to allocate 137. MiB for an array with shape (3000, 4000, 3) and data type float32 当显示带有 plt.show() 的图像时 -&gt; MemoryError: Unable to allocate array with shape (3600, 7200, 4) and data type float32 - When showing an image with plt.show() -> MemoryError : Unable to allocate array with shape (3600, 7200, 4) and data type float32 MemoryError: Unable to allocate 5.62 GiB for an array with shape (16384, 30720, 3) and data type float32 when training StyleGan2 - MemoryError: Unable to allocate 5.62 GiB for an array with shape (16384, 30720, 3) and data type float32 When training StyleGan2 训练我的 model 时出现 Memory 错误:无法为形状为(3094、720、1280、3)和数据类型 float32 的数组分配 31.9 GiB - Memory error while training my model: Unable to allocate 31.9 GiB for an array with shape (3094, 720, 1280, 3) and data type float32 Python/Windows 不允许 numpy 分配 RAM “numpy.core._exceptions.MemoryError” - Python/Windows doesn't let numpy allocate RAM “numpy.core._exceptions.MemoryError” MemoryError: 无法分配形状为 (200, 20, 244, 244, 3) 和数据类型为 float64 的数组 - MemoryError: Unable to allocate array with shape (200, 20, 244, 244, 3) and data type float64 MemoryError:无法为形状为 (323313, 3435) 且数据类型为 float64 的数组分配 8.27 GiB - MemoryError: Unable to allocate 8.27 GiB for an array with shape (323313, 3435) and data type float64 MemoryError:无法为形状为 (5004, 96) 且数据类型为 int32 的数组分配 1.83 MiB - MemoryError: Unable to allocate 1.83 MiB for an array with shape (5004, 96) and data type int32
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM