简体   繁体   中英

I was about to train tensorflow but I'm encountering this issue

Python 3.6.6

Tensorflow 1.14.0

numpy 1.17.4

  • conda create -n tf1.12 pip python==3.6.6
  • conda install python=3.6.6
  • activate tf1.12

  • pip install --ignore-installed --upgrade tensorflow==1.12

  • conda install -c anaconda protobuf

  • pip install pillow
  • pip install python-tk
  • pip install lxml
  • pip install cython
  • pip install jupyter
  • pip install matplotlib
  • pip install pandas
  • pip install opencv-python
  • pip install numpy

Im only using Tensorflow-CPU

I'm following https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 project. Please help

C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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)])
WARNING:tensorflow:From C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\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.
WARNING:tensorflow:From C:\tf1.12\models\research\object_detection\legacy\trainer.py:267: 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
WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
WARNING:tensorflow:From C:\tf1.12\models\research\object_detection\builders\dataset_builder.py:86: parallel_interleave (from tensorflow.contrib.data.python.ops.interleave_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.data.experimental.parallel_interleave(...)`.
WARNING:tensorflow:From C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\site-packages\tensorflow\python\ops\sparse_ops.py:1165: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Create a `tf.sparse.SparseTensor` and use `tf.sparse.to_dense` instead.
WARNING:tensorflow:From C:\tf1.12\models\research\object_detection\core\batcher.py:101: batch (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.batch(batch_size)` (or `padded_batch(...)` if `dynamic_pad=True`).
WARNING:tensorflow:From C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\site-packages\tensorflow\python\training\input.py:751: QueueRunner.__init__ (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
WARNING:tensorflow:From C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\site-packages\tensorflow\python\training\input.py:751: add_queue_runner (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:depth of additional conv before box predictor: 0
WARNING:tensorflow:From C:\tf1.12\models\research\object_detection\predictors\heads\box_head.py:94: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
WARNING:tensorflow:From C:\tf1.12\models\research\object_detection\core\losses.py:350: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See `tf.nn.softmax_cross_entropy_with_logits_v2`.

Traceback (most recent call last):
  File "legacy/train.py", line 185, in <module>
    tf.app.run()
  File "C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "C:\Users\Teffy\Anaconda3\envs\tf1.12\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, in new_func
    return func(*args, **kwargs)
  File "legacy/train.py", line 181, in main
    graph_hook_fn=graph_rewriter_fn)
  File "C:\tf1.12\models\research\object_detection\legacy\trainer.py", line 305, in train
    train_config.optimizer)
  File "C:\tf1.12\models\research\object_detection\builders\optimizer_builder.py", line 139, in build
    return build_optimizers_tf_v1(config, global_step)
  File "C:\tf1.12\models\research\object_detection\builders\optimizer_builder.py", line 56, in build_optimizers_tf_v1
    global_step=global_step)
  File "C:\tf1.12\models\research\object_detection\builders\optimizer_builder.py", line 186, in _create_learning_rate
    learning_rate_sequence, config.warmup)
  File "C:\tf1.12\models\research\object_detection\utils\learning_schedules.py", line 187, in manual_stepping
    raise ValueError('Entries in boundaries must be strictly increasing.')
ValueError: Entries in boundaries must be strictly increasing.

Try using the latest tensorflow and installing all the packages with conda. Eg.

conda create -n tensorflow python==3.7
conda activate tensorflow
conda install tensorflow==1.15

The last line should install tensorflow with the appropriate cudnn library files and a bunch of other dependencies like numpy. You can see which are already installed with pip list .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM