tensorflow-resnet
tensorflow-resnet copied to clipboard
'convert.py' does not work with current 'resnet.py'
Running convert.py outputs the error:
Traceback (most recent call last):
File "convert.py", line 343, in <module>
tf.app.run()
File "/home/mifs/mttt2/.virtualenvs/tfr1.0/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "convert.py", line 339, in main
convert(g, img, img_p, layers)
File "convert.py", line 259, in convert
bottleneck=True)
TypeError: inference() got an unexpected keyword argument 'preprocess'
The current version of resnet does not seem to have a preprocess option. Is this still required?
I have met the same problem, and my tensorflow version is r0.12.
Hi I am having the same issue. Did you find the way to solve it?
I just comment out the preporcess part.
add preporcess part in inference(...) function
def inference(x, is_training,
num_classes=1000,
num_blocks=None, # defaults to 50-layer network
use_bias=False, # defaults to using batch norm
preprocess=True,
bottleneck=True):
if num_blocks is None:
num_blocks = [3, 4, 6, 3]
if preprocess:
x = _imagenet_preprocess(x)
# ....