运行深度购物模型时出错



我正在尝试重现深度购物模型的结果,但是当我运行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 上都发现了此错误

我的问题:

如何解决此错误?

缺少simple_resnet.py文件。作者尚未在存储库中提供该代码文件。尝试使用此链接中的resnet.py创建它。

最新更新