画像のリストをループして Google の Inception モデルを実行しようとすると、約 100 枚ほどの画像の後、以下の問題が発生します。メモリが不足しているようです。私はCPUで実行しています。他の誰かがこの問題に遭遇しましたか?
Traceback (most recent call last):
File "clean_dataset.py", line 33, in <module>
description, score = inception.run_inference_on_image(f.read())
File "/Volumes/EXPANSION/research/dcgan-transfer/data/classify_image.py", line 178, in run_inference_on_image
node_lookup = NodeLookup()
File "/Volumes/EXPANSION/research/dcgan-transfer/data/classify_image.py", line 83, in __init__
self.node_lookup = self.load(label_lookup_path, uid_lookup_path)
File "/Volumes/EXPANSION/research/dcgan-transfer/data/classify_image.py", line 112, in load
proto_as_ascii = tf.gfile.GFile(label_lookup_path).readlines()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 110, in readlines
self._prereadline_check()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 72, in _prereadline_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/errors.py", line 463, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors.ResourceExhaustedError: /tmp/imagenet/imagenet_2012_challenge_label_map_proto.pbtxt
real 6m32.403s
user 7m8.210s
sys 1m36.114s