运行 style.py 时报错,我是新手,请帮帮我。

作者: wicyn创建于 2023年6月30日更新于 2023年6月30日

2023-06-30 12:08:16.805705: I tensorflow/core/common_runtime/bfc_allocator.cc:958] 1 Chunks of size 171305984 totalling 163.37MiB 2023-06-30 12:08:16.808694: I tensorflow/core/common_runtime/bfc_allocator.cc:958] 1 Chunks of size 184549376 totalling 176.00MiB 2023-06-30 12:08:16.809081: I tensorflow/core/common_runtime/bfc_allocator.cc:958] 1 Chunks of size 262144000 totalling 250.00MiB 2023-06-30 12:08:16.809482: I tensorflow/core/common_runtime/bfc_allocator.cc:958] 1 Chunks of size 335544320 totalling 320.00MiB 2023-06-30 12:08:16.809970: I tensorflow/core/common_runtime/bfc_allocator.cc:962] Sum Total of in-use chunks: 4.44GiB 2023-06-30 12:08:16.810709: I tensorflow/core/common_runtime/bfc_allocator.cc:964] total_region_allocated_bytes_: 4979687424 memory_limit_: 4979687424 available bytes: 0 curr_region_allocation_bytes_: 9959374848 2023-06-30 12:08:16.813068: I tensorflow/core/common_runtime/bfc_allocator.cc:970] Stats: Limit: 4979687424 InUse: 4764532736 MaxInUse: 4884267008 NumAllocs: 495 MaxAllocSize: 1526726656 2023-06-30 12:08:16.813297: W tensorflow/core/common_runtime/bfc_allocator.cc:429] ***********************************************************_***********x***************************x 2023-06-30 12:08:16.814366: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at conv_ops.cc:539 : Resource exhausted: OOM when allocating tensor with shape[20,256,64,64] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc Traceback (most recent call last): File "C:\Users\qq978.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\Python\client\session.py", line 1367, in _do_call return fn(*args) File "C:\Users\qq978.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\Python\client\session.py", line 1352, in _run_fn target_list, run_metadata) File "C:\Users\qq978.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\Python\client\session.py", line 1445, in _call_tf_sessionrun run_metadata) tensorflow.Python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[20,256,64,64] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [[{{node Conv2D_37}}]] Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "style.py", line 167, in main() File "style.py", line 147, in main for preds, losses, i, epoch in optimize(*args, **kwargs): File "src\optimize.py", line 114, in optimize train_step.run(feed_dict=feed_dict) File

内容来源: lengstrom/fast-style-transfer