내가 PIL을 설치 한 어떤 속성 'imread을'이 없다, 그러나 나는 다음과 같은 오류 메시지가 계속 : 나는 imread
에 관한 모든 게시물 겪었지만, 운이 없었을'모듈'개체가
'module' object has no attribute 'imread'.
. 이견있는 사람?
Danys-MacBook-Pro:~ danymeneses$ python
/Users/danymeneses/Desktop/autoencoder/main.py --dataset
/Users/danymeneses/Desktop/autoencoder/dataseti --is_train True
{'batch_size': 12,
'beta1': 0.5,
'checkpoint_dir': 'checkpoint',
'dataset': '/Users/danymeneses/Desktop/autoencoder/dataseti',
'epoch': 5,
'image_size': 108,
'is_crop': False,
'is_run': False,
'is_train': True,
'learning_rate': 0.0002,
'noise': 0.5,
'output_dir': 'output',
'sample_dir': 'samples',
'train_size': inf}
WARNING:tensorflow:Passing a `GraphDef` to the SummaryWriter is deprecated.
Pass a `Graph` object instead, such as `sess.graph`.
Traceback (most recent call last):
File "/Users/danymeneses/Desktop/autoencoder/main.py", line 94, in <module>
tf.app.run()
File "/Library/Python/2.7/site-packages/tensorflow/python/platform/app.py",
line 30, in run
sys.exit(main(sys.argv))
File "/Users/danymeneses/Desktop/autoencoder/main.py", line 75, in main
autoencoder.train(FLAGS)
File "/Users/danymeneses/Desktop/autoencoder/model.py", line 186, in train
sample = [get_image(sample_file, self.image_size, is_crop=self.is_crop) for
sample_file in sample_files]
File "/Users/danymeneses/Desktop/autoencoder/utils.py", line 23, in get_image
return transform(imread(image_path), image_size, is_crop)
File "/Users/danymeneses/Desktop/autoencoder/utils.py", line 38, in imread
return scipy.misc.imread(path).astype(np.float)
AttributeError: 'module' object has no attribute 'imread'
가능한 [scipy.misc 모듈에 imread가없는 속성이 있습니까?] (http://stackoverflow.com/questions/15345790/scipy-misc-module-has-no-attribute-imread) – rayryeng
사본에 제시된대로 PIL 위에 베개를 설치하십시오. – rayryeng
'misc '을 어떻게 가져 왔습니까? 올바른 방법은'scipy import misc'입니다. – hpaulj