运行Deep-shopping模型时出现错误

3

我正在尝试复现Deep-shopping模型的结果,但当我运行train_n_test.py文件时,出现以下错误:

AttributeError                            Traceback (most recent call last)
<ipython-input-1-754aa36f8c5c> in <module>()
      8 import time
      9 from datetime import datetime
---> 10 from simple_resnet import *
     11 from hyper_parameters import *
     12 

~/deep-shopping/simple_resnet.py in <module>()
      6 '''
      7 import numpy as np
----> 8 from hyper_parameters import *
      9 
     10 #import tensorflow as tf

~/deep-shopping/hyper_parameters.py in <module>()
     31 
     32 ## Hyper-parameters about the model
---> 33 tf.app.flags.DEFINE_int('num_residual_blocks', 5, '''number of residual blocks in ResNet''')
     34 
     35 

AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'DEFINE_int'

我发现这个错误在Python2.7和Python3.5中都存在。

我的问题是:

如何解决这个问题?


你正在使用哪个版本的TensorFlow?尝试在命令行中输入 python -c 'import tensorflow as tf; print(tf.__version__)' - Engineero
@Engineero:TensorFlow 1.3.0 - Hector Blandin
1个回答

1

缺少 simple_resnet.py 文件。作者没有在存储库中提供该代码文件。尝试使用 resnet.py 从这个链接 创建它。


你能够运行它吗? - tam

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接