當我試圖在圖像列表中循環運行Google的Inception模型時,在大約100張左右的圖像後出現以下問題。它似乎已經耗盡內存。我正在運行一個CPU。有其他人遇到過這個問題嗎?Google Inception tensorflow.python.framework.errors.ResourceExhaustedError
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
https://github.com/tensorflow/models/tree/master/inception