我本打算训练张量流,但是遇到这个问题

时间:2019-11-16 09:17:42

标签: python tensorflow

Python 3.6.6

Tensorflow 1.14.0

numpy 1.17.4

  • conda create -n tf1.12 pip python == 3.6.6
  • conda安装python = 3.6.6
  • 激活tf1.12

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

  • conda install -c anaconda protobuf

  • pip安装枕头
  • pip安装python-tk
  • pip install lxml
  • pip安装cython
  • pip安装jupyter
  • pip安装matplotlib
  • pip安装熊猫
  • pip安装opencv-python
  • pip install numpy

我仅使用Tensorflow-CPU

我正在关注https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10项目。请帮助

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.

1 个答案:

答案 0 :(得分:0)

尝试使用最新的tensorflow并使用conda安装所有软件包。例如。

import dynamic from 'next/dynamic'
const Chart = dynamic(() => import('react-apexcharts'), {ssr:false})

最后一行应使用适当的cudnn库文件和一堆其他依赖项(如numpy)安装tensorflow。您可以看到conda create -n tensorflow python==3.7 conda activate tensorflow conda install tensorflow==1.15 已经安装了哪些。