bilylee / SiamFC-TensorFlow

A TensorFlow implementation of the SiamFC tracker
MIT License
358 stars 112 forks source link

Error when starting training from scratch #22

Closed TachibanaYoshino closed 6 years ago

TachibanaYoshino commented 6 years ago

你好,当我执行训练时报错了,错误如下: Traceback (most recent call last): File "/home/cc/桌面/SiamFC-TensorFlow/experiments/SiamFC-3s-color-scratch.py", line 29, in '--enforce_clean': False, File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/experiment.py", line 199, in run run() File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/run.py", line 229, in call self.result = self.main_function(args) File "/home/cc/anaconda3/lib/python3.6/site-packages/sacred/config/captured_function.py", line 48, in captured_function result = wrapped(args, **kwargs) File "/home/cc/桌面/SiamFC-TensorFlow/train_siamesemodel.py", line 162, in main , loss, batch_loss = sess.run([train_op, model.total_loss, model.batch_loss]) File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run run_metadata_ptr) File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1120, in _run feed_dict_tensor, options, run_metadata) File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run options, run_metadata) File "/home/cc/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Need minval < maxval, got 0 >= 0 [[Node: random_uniform_4 = RandomUniformInt[T=DT_INT32, Tout=DT_INT32, seed=0, seed2=0](random_uniform_4/shape, random_uniform_4/min, sub_14)]] [[Node: train/IteratorGetNext = IteratorGetNextoutput_shapes=[[?,127,127,3], [?,255,255,3]], output_types=[DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Process finished with exit code 130 (interrupted by signal 2: SIGINT) 目前我没有搞清楚这个错误是什么原因,也未在网上找到类似的问题?

pmixer commented 6 years ago

@hawjnsafdjlk 首先确定您的 tensorflow 可用嘛?以及对应版本是?这样一堆报错扔上来指望开发者人肉debug没有描述问题的情景与分析通常不会得到解答。毕竟最了解情况的是你自己,还请提供更多信息,大家看看能不能帮上忙。我这边实测 ubuntu 16.04 py2.7 tf 1.4 是 OK 的。

TachibanaYoshino commented 6 years ago

@PeterHuang2015 已经确认出错原因,是因为在dataloder中,把训练数据预处理的255-2×8的裁剪方式,改为了255大小,然后改回来就ok,环境是tf1.4,py3.5,ubantu16.04

pmixer commented 6 years ago

@hawjnsafdjlk got it ,👍