teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

追記

2019/10/04 05:09

投稿

Mustard
Mustard

スコア11

title CHANGED
File without changes
body CHANGED
@@ -61,4 +61,35 @@
61
61
  local_test.sh内40行目のpython "${WORK_DIR}"/model_test.py -vをpython "${WORK_DIR}"/model_test.py -v -1にしたところ実行が通りました。ただ以下の警告が多少の形を変えて数百行繰り返し発生してしまうのですが、これは何が問題なのでしょうか。
62
62
  ```
63
63
  WARNING:tensorflow:Entity <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x000001C557142828>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x000001C557142828>>: AssertionError: Bad argument number for Name: 3, expecting 4
64
+ ```
65
+
66
+ (追記2)
67
+ gastのバージョンを0.3.2から0.2.2にすることで追記に示したエラーが消えました。
68
+ 出てくる警告はtf.xxx系の関数が非推奨なのでtf.compat.v1.xxxを代わりに使えというものですがこれは無視してよいのでしょうか。
69
+ また、以下のエラーが発生し、結局local_test.shは正常終了しません。
70
+ ResourceExhaustedErrorなのでtrain.py内のバッチサイズやクロップサイズなどを弄ってみているのですが、解決いたしません...
71
+ 何か方法をご存知でしょうか。
72
+ ```error
73
+ 2019-10-04 13:58:24.570618: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at conv_ops.cc:486 : Resource exhausted: OOM when allocating tensor with shape[4,128,257,257] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
74
+ Traceback (most recent call last):
75
+ File "C:\Users\XXX\Anaconda3\envs\TensorFlow\lib\site-packages\tensorflow\python\client\session.py", line 1356, in _do_call
76
+ return fn(*args)
77
+ File "C:\Users\XXX\Anaconda3\envs\TensorFlow\lib\site-packages\tensorflow\python\client\session.py", line 1341, in _run_fn
78
+ options, feed_dict, fetch_list, target_list, run_metadata)
79
+ File "C:\Users\XXX\Anaconda3\envs\TensorFlow\lib\site-packages\tensorflow\python\client\session.py", line 1429, in _call_tf_sessionrun
80
+ run_metadata)
81
+ tensorflow.python.framework.errors_impl.ResourceExhaustedError: 2 root error(s) found.
82
+ (0) Resource exhausted: OOM when allocating tensor with shape[4,128,257,257] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
83
+ [[{{node xception_65/entry_flow/block1/unit_1/xception_module/separable_conv2_pointwise/Conv2D}}]]
84
+ 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.
85
+
86
+ [[gradients/xception_65/middle_flow/block1/unit_5/xception_module/separable_conv3_depthwise/BatchNorm/FusedBatchNorm_grad/FusedBatchNormGrad/_12968]]
87
+ 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.
88
+
89
+ (1) Resource exhausted: OOM when allocating tensor with shape[4,128,257,257] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
90
+ [[{{node xception_65/entry_flow/block1/unit_1/xception_module/separable_conv2_pointwise/Conv2D}}]]
91
+ 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.
92
+
93
+ 0 successful operations.
94
+ 0 derived errors ignored.
64
95
  ```

2

追記

2019/10/04 05:09

投稿

Mustard
Mustard

スコア11

title CHANGED
File without changes
body CHANGED
@@ -55,4 +55,10 @@
55
55
  File "C:\Users\XXX\Anaconda3\envs\TensorFlow\lib\site-packages\absl\flags\_flagvalues.py", line 698, in get_value
56
56
  raise _exceptions.Error('Missing value for flag ' + arg) # pylint: disable=undefined-loop-variable
57
57
  absl.flags._exceptions.Error: Missing value for flag -v
58
+ ```
59
+
60
+ (追記)
61
+ local_test.sh内40行目のpython "${WORK_DIR}"/model_test.py -vをpython "${WORK_DIR}"/model_test.py -v -1にしたところ実行が通りました。ただ以下の警告が多少の形を変えて数百行繰り返し発生してしまうのですが、これは何が問題なのでしょうか。
62
+ ```
63
+ WARNING:tensorflow:Entity <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x000001C557142828>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x000001C557142828>>: AssertionError: Bad argument number for Name: 3, expecting 4
58
64
  ```

1

追記

2019/10/02 09:38

投稿

Mustard
Mustard

スコア11

title CHANGED
File without changes
body CHANGED
@@ -4,6 +4,7 @@
4
4
  その後、model_test.pyとlocal_test.shを実行し、動作確認を行ったところ、model_test.pyは大量の警告が出たものの、正常終了しました。
5
5
  一方でlocal_test.shは以下のエラーが発生し、実行が正常に終了しません。
6
6
  どうすれば実行できるのでしょうか。
7
+ vの値がないと言われているので-vオプションで値を指定してあげればいいのかと考えていますがsh local_test.sh -v -1を実行しても同じエラーメッセージが出てくるだけでした。
7
8
  当方機械学習はおろか、python自体に触れるのが今回が初のため、どのような対処が必要なのか皆目見当がつきません。
8
9
  お手数をおかけしますがご教授願います。
9
10
  ```local_test