models icon indicating copy to clipboard operation
models copied to clipboard

legacy/train.py error

Open aligokkaya opened this issue 6 years ago • 2 comments

(tens-test) C:\tensorflow1\models\research\object_detection\legacy>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

  • https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  • https://github.com/tensorflow/addons
  • https://github.com/tensorflow/io (for I/O related ops) If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From train.py:56: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.

WARNING:tensorflow:From train.py:56: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.

WARNING:tensorflow:From train.py:185: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

WARNING:tensorflow:From C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\absl\app.py:250: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. W0215 04:00:33.106456 4988 deprecation.py:323] From C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\absl\app.py:250: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. WARNING:tensorflow:From train.py:91: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead.

W0215 04:00:33.114461 4988 module_wrapper.py:139] From train.py:91: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead.

WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\utils\config_util.py:102: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

W0215 04:00:33.117460 4988 module_wrapper.py:139] From C:\tensorflow1\models\research\object_detection\utils\config_util.py:102: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

Windows fatal exception: access violation

Current thread 0x0000137c (most recent call first): File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\tensorflow_core\python\lib\io\file_io.py", line 84 in _preread_check File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\tensorflow_core\python\lib\io\file_io.py", line 122 in read File "C:\tensorflow1\models\research\object_detection\utils\config_util.py", line 103 in get_configs_from_pipeline_file File "train.py", line 94 in main File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324 in new_func File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\absl\app.py", line 250 in _run_main File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\absl\app.py", line 299 in run File "C:\Users\aligk\Anaconda3\envs\tens-test\lib\site-packages\tensorflow_core\python\platform\app.py", line 40 in run File "train.py", line 185 in

aligokkaya avatar Feb 15 '20 01:02 aligokkaya

I have perfectly same problem... can i get some help...? my spec is

  • window 10
  • python 3.6.8
  • CUDA 10.0
  • cuDNN 7.6.0
  • tensorflow, tensorflow-gpu version 1.15

==============================================

I solve this problem at linux. (window10 -> ubuntu 18.04) Also check your .record files, if size of record file is 0byte, it means you failed to make right record file. I think you may have used generate_tfrecord.py to make record file from csv file. In latest version of generate_tfrecord.py needs three strings :

  1. csv_input
  2. output_path
  3. image_dir but in Usage writed at top of the file : python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=train.record you need to add one more --image_dir='path of images'

In my case, full command is like that, and it's same for test source. python3 generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=images/train

After making right record files, all is good. I didn't check it at window10 but i think it can be one of the solution.

And is link for generate_tfrecord.py https://github.com/datitran/raccoon_dataset/blob/master/generate_tfrecord.py

msjun23 avatar Mar 06 '20 22:03 msjun23

thank you

msjun23 [email protected], 7 Mar 2020 Cmt, 01:10 tarihinde şunu yazdı:

I have perfectly same problem... can i get some help...? my spec is

  • window 10
  • python 3.6.8
  • CUDA 10.0
  • cuDNN 7.6.0
  • tensorflow, tensorflow-gpu version 1.15

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/8143?email_source=notifications&email_token=AKPPZG522YM4EFSYXEMIVLLRGFYGDA5CNFSM4KVTJL7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODAQTI#issuecomment-595986509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKPPZG36NRKIDBQLN5X7KADRGFYGDANCNFSM4KVTJL7A .

aligokkaya avatar Mar 07 '20 13:03 aligokkaya