models icon indicating copy to clipboard operation
models copied to clipboard

Train.py gives AttributeError: 'InputReader' object has no attribute 'mask_type'

Open fdkssdks opened this issue 8 years ago • 3 comments

When running
python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_resnet50_coco.config

WARNING:tensorflow:From /home/ubuntu/.virtualenvs/dl4cv/lib/python3.5/site-packages/tensorflow/python/platform/app.py:124: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
WARNING:tensorflow:From /home/ubuntu/models/research/object_detection/legacy/trainer.py:262: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
Traceback (most recent call last):
  File "legacy/train.py", line 184, in <module>
    tf.app.run()
  File "/home/ubuntu/.virtualenvs/dl4cv/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 124, in run
    _sys.exit(main(argv))
  File "/home/ubuntu/.virtualenvs/dl4cv/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 136, in new_func
    return func(*args, **kwargs)
  File "legacy/train.py", line 180, in main
    graph_hook_fn=graph_rewriter_fn)
  File "/home/ubuntu/models/research/object_detection/legacy/trainer.py", line 276, in train
    train_config.prefetch_queue_capacity, data_augmentation_options)
  File "/home/ubuntu/models/research/object_detection/legacy/trainer.py", line 59, in create_input_queue
    tensor_dict = create_tensor_dict_fn()
  File "legacy/train.py", line 121, in get_next
    dataset_builder.build(config)).get_next()
  File "/home/ubuntu/models/research/object_detection/builders/dataset_builder.py", line 120, in build
    instance_mask_type=input_reader_config.mask_type,
AttributeError: 'InputReader' object has no attribute 'mask_type'

How can I solve this issue?

System information OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Amazon AWS p2.xlarge Ubuntu 16.04 LTS TensorFlow installed from (source or binary): binary TensorFlow version (use command below): 1.5.0 Bazel version (if compiling from source): CUDA/cuDNN version: 9.0 / 7.0 GPU model and memory: Amazon AWS k series 100GB Exact command to reproduce: python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_resnet50_coco.config

fdkssdks avatar Jul 27 '18 19:07 fdkssdks

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code

tensorflowbutler avatar Jul 28 '18 06:07 tensorflowbutler

same issue I'm facing. when rupython3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/pipeline.config

/home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Unable to init server: Could not connect: Connection refused Unable to init server: Could not connect: Connection refused

(train.py:31607): Gdk-CRITICAL **: 13:26:25.268: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed WARNING:tensorflow:From /home/ats/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py:125: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. INFO:tensorflow:Scale of 0 disables regularizer. INFO:tensorflow:Scale of 0 disables regularizer. WARNING:tensorflow:From /home/ats/workspace/models/research/object_detection/legacy/trainer.py:265: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.create_global_step Traceback (most recent call last): File "train.py", line 184, in tf.app.run() File "/home/ats/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/home/ats/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 306, in new_func return func(*args, **kwargs) File "train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "/home/ats/workspace/models/research/object_detection/legacy/trainer.py", line 279, in train train_config.prefetch_queue_capacity, data_augmentation_options) File "/home/ats/workspace/models/research/object_detection/legacy/trainer.py", line 59, in create_input_queue tensor_dict = create_tensor_dict_fn() File "train.py", line 121, in get_next dataset_builder.build(config)).get_next() File "/home/ats/workspace/models/research/object_detection/builders/dataset_builder.py", line 120, in build instance_mask_type=input_reader_config.mask_type, AttributeError: mask_type

sandesha-hegde avatar Aug 28 '19 08:08 sandesha-hegde

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler