opened
mpeniak
username_0
Hi guys,

I am trying to re-train the inception v3 from scratch on my own data. I have completed all steps successfully and modified all files to reflect the properties of my training dataset.

However, when I try to run the following script:

` bazel-bin/inception/imagenet_train --num_gpus=1 --batch_size=32 --train_dir=/tmp/train --data_dir=/notebooks/ActionRecogniser/UCF_TFR_flow/`

I get a whole series of errors depending on which version of tensorflow I use. When I use the latest version from master I get:

`Traceback (most recent call last):
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/imagenet_train.py", line 41, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/imagenet_train.py", line 37, in main
    inception_train.train(dataset)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_train.py", line 241, in train
    scope, reuse_variables)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_train.py", line 109, in _tower_loss
    scope=scope)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_model.py", line 87, in inference
    scope=scope)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/inception_model.py", line 87, in inception_v3
    scope='conv0')
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/scopes.py", line 155, in func_with_args
    return func(*args, **current_args)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/ops.py", line 234, in conv2d
    outputs = batch_norm(conv, **batch_norm_params)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/scopes.py", line 155, in func_with_args
    return func(*args, **current_args)
  File "/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/ops.py", line 88, in batch_norm
    initializer=tf.zeros_initializer(),
TypeError: zeros_initializer() takes at least 1 argument (0 given)
` 

If I train with version 0.11 I get:

`Traceback (most recent call last):
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/imagenet_train.py", line 41, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/imagenet_train.py", line 37, in main
    inception_train.train(dataset)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_train.py", line 241, in train
    scope, reuse_variables)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_train.py", line 109, in _tower_loss
    scope=scope)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/inception_model.py", line 87, in inference
    scope=scope)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/inception_model.py", line 87, in inception_v3
    scope='conv0')
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/scopes.py", line 155, in func_with_args
    return func(*args, **current_args)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/ops.py", line 228, in conv2d
    restore=restore)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/scopes.py", line 155, in func_with_args
    return func(*args, **current_args)
  File "/root/models/inception/bazel-bin/inception/imagenet_train.runfiles/inception/inception/slim/variables.py", line 279, in variable
    collections += [tf.GraphKeys.GLOBAL_VARIABLES, MODEL_VARIABLES]
AttributeError: type object 'GraphKeys' has no attribute 'GLOBAL_VARIABLES'`

I have also tried various different versions, also tried modifying various python scrips (as per recommendations online) but whichever version and combination of fixes I use, I simply cannot execute this scrips successful.

Could you please point me in right direction? I am trying to train inception v3 on my own dataset from scratch...I am not interested in pre-training...that works but gives extremely poor results due to the nature of my input data.

Thanks!
What is the tensorflow version that works for training the inception model?
issue
created
jmchen-g
username_1
Looks like many models have been broken recently. Could you find a working copy of the model without modifying anything and only then, try to apply your changes? Thanks.
comment
created
aselle
username_2
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!
comment
closed
aselle
username_2
issue
created
anywang
username_3
there are so many problems when using tensorflow 1.0, ..
comment
created
anywang
username_3
slim/inception_model.py", line 125, in inception_v3
    net = tf.concat(axis=[branch1x1, branch5x5, branch3x3dbl, branch_pool], values=3)
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1047, in concat
    dtype=dtypes.int32).get_shape(
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor
    as_ref=False)
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 716, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 165, in constant
    tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/SLP_Extended/tools/anaconda-2.4.3/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
comment