【问题标题】:Error running Deep-shopping model运行深度购物模型时出错
【发布时间】:2017-10-17 16:15:54
【问题描述】:

我正在尝试重现Deep-shopping model 的结果,但是当我运行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: tensforflow 1.3.0

标签: python-3.x tensorflow deep-learning


【解决方案1】:

simple_resnet.py 文件丢失。作者没有在存储库中提供该代码文件。尝试使用resnet.py from this link 创建它。

【讨论】:

  • 你能运行它吗?
猜你喜欢
  • 2020-11-10
  • 1970-01-01
  • 1970-01-01
  • 2019-08-15
  • 1970-01-01
  • 2015-11-23
  • 1970-01-01
  • 1970-01-01
  • 2022-08-18
相关资源
最近更新 更多