win10 tensorflow ssd用自己的数据集报错Assign requires shapes of both tensors to match. lhs shape= [8] rhs sha

用自己的数据集直接执行eval_ssd_network.py,报错如下:

INFO:tensorflow:Restoring parameters from ./checkpoints/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt
Traceback (most recent call last):
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
    return fn(*args)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [3,3,256,8] rhs shape= [3,3,256,84]
     [[Node: save/Assign_6 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/weights, save/RestoreV2:6)]]
     [[Node: save/RestoreV2/_29 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_58_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:/work/SSD-Tensorflow-master/eval_ssd_network.py", line 364, in
    tf.app.run()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "D:/work/SSD-Tensorflow-master/eval_ssd_network.py", line 338, in main
    session_config=config)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\contrib\slim\python\slim\evaluation.py", line 212, in evaluate_once
    config=session_config)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\evaluation.py", line 209, in _evaluate_once
    session_creator=session_creator, hooks=hooks) as session:
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 826, in __init__
    stop_grace_period_secs=stop_grace_period_secs)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 549, in __init__
    self._sess = _RecoverableSession(self._coordinated_creator)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 1012, in __init__
    _WrappedSession.__init__(self, self._create_session())
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 1017, in _create_session
    return self._sess_creator.create_session()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 706, in create_session
    self.tf_sess = self._session_creator.create_session()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\monitored_session.py", line 477, in create_session
    init_fn=self._scaffold.init_fn)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\session_manager.py", line 281, in prepare_session
    config=config)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\session_manager.py", line 195, in _restore_checkpoint
    saver.restore(sess, checkpoint_filename_with_path)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1752, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 900, in run
    run_metadata_ptr)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
    run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [3,3,256,8] rhs shape= [3,3,256,84]
     [[Node: save/Assign_6 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/weights, save/RestoreV2:6)]]
     [[Node: save/RestoreV2/_29 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_58_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

Caused by op 'save/Assign_6', defined at:
  File "D:/work/SSD-Tensorflow-master/eval_ssd_network.py", line 364, in
    tf.app.run()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "D:/work/SSD-Tensorflow-master/eval_ssd_network.py", line 338, in main
    session_config=config)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\contrib\slim\python\slim\evaluation.py", line 200, in evaluate_once
    saver = tf_saver.Saver(variables_to_restore)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1284, in __init__
    self.build()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1296, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1333, in _build
    build_save=build_save, build_restore=build_restore)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 781, in _build_internal
    restore_sequentially, reshape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 422, in _AddRestoreOps
    assign_ops.append(saveable.restore(saveable_tensors, shapes))
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 113, in restore
    self.op.get_shape().is_fully_defined())
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\state_ops.py", line 219, in assign
    validate_shape=validate_shape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\gen_state_ops.py", line 63, in assign
    use_locking=use_locking, name=name)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 1740, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [3,3,256,8] rhs shape= [3,3,256,84]
     [[Node: save/Assign_6 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/weights, save/RestoreV2:6)]]
     [[Node: save/RestoreV2/_29 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_58_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]


Process finished with exit code 1

试着修改参数:一

--eval_dir=./logs/
    --dataset_dir=./VOC2007/test/
    --dataset_name=pascalvoc_2007 
    --dataset_split_name=test 
    --model_name=ssd_300_vgg 
    --checkpoint_path=./checkpoints/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt
    --batch_size=1

--eval_dir=./logs/
--dataset_dir=./VOC2007/test/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--checkpoint_path=./checkpoints/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt
--batch_size=1
叁:
--eval_dir=./logs/
--dataset_dir=./VOC2007/test/tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--checkpoint_path=./checkpoints/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt
--batch_size=16

试着把模型路径删了:带参数

--eval_dir=./logs/
--dataset_dir=./VOC2007/test/tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--batch_size=1

第二种报错:

W c:\users\user\source\repos\tensorflow\tensorflow\core\framework\op_kernel.cc:1318] OP_REQUIRES failed at save_restore_tensor.cc:170 : Invalid argument: Unsuccessful TensorSliceReader constructor: Failed to get matching files on /tmp/tfmodel/: Not found: FindFirstFile failed for: /tmp/tfmodel : ϵͳ�Ҳ���ָ����·����
; No such process

Process finished with exit code -1073741819 (0xC0000005)

都错了,目录看过是正确的,其他不知道为什么?

直接训练,传入参数:

--train_dir=./logs/
--dataset_dir=./VOC2007/test/tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--save_summaries_secs=60
--save_interval_secs=600
--weight_decay=0.0005
--optimizer=adam
--learning_rate=0.001
--learning_rate_decay_factor=0.94
--batch_size=16

报错如下:

INFO:tensorflow:Error reported to Coordinator: , Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save/RestoreV2:15)]]

Caused by op 'save/Assign_15', defined at:
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 392, in
    tf.app.run()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 374, in main
    pad_step_number=False)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1284, in __init__
    self.build()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1296, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1333, in _build
    build_save=build_save, build_restore=build_restore)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 781, in _build_internal
    restore_sequentially, reshape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 422, in _AddRestoreOps
    assign_ops.append(saveable.restore(saveable_tensors, shapes))
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 113, in restore
    self.op.get_shape().is_fully_defined())
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\state_ops.py", line 219, in assign
    validate_shape=validate_shape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\gen_state_ops.py", line 63, in assign
    use_locking=use_locking, name=name)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 1740, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save/RestoreV2:15)]]

Traceback (most recent call last):
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
    return fn(*args)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save/RestoreV2:15)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 392, in
    tf.app.run()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 388, in main
    sync_optimizer=None)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\contrib\slim\python\slim\learning.py", line 748, in train
    master, start_standard_services=False, config=session_config) as sess:
  File "D:\python\soft\lib\contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\supervisor.py", line 1005, in managed_session
    self.stop(close_summary_writer=close_summary_writer)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\supervisor.py", line 833, in stop
    ignore_live_threads=ignore_live_threads)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\coordinator.py", line 389, in join
    six.reraise(*self._exc_info_to_raise)
  File "D:\python\soft\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\supervisor.py", line 994, in managed_session
    start_standard_services=start_standard_services)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\supervisor.py", line 731, in prepare_or_wait_for_session
    init_feed_dict=self._init_feed_dict, init_fn=self._init_fn)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\session_manager.py", line 281, in prepare_session
    config=config)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\session_manager.py", line 211, in _restore_checkpoint
    saver.restore(sess, ckpt.model_checkpoint_path)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1752, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 900, in run
    run_metadata_ptr)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
    run_metadata)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save/RestoreV2:15)]]

Caused by op 'save/Assign_15', defined at:
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 392, in
    tf.app.run()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "D:/work/SSD-Tensorflow-master/train_ssd_network.py", line 374, in main
    pad_step_number=False)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1284, in __init__
    self.build()
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1296, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1333, in _build
    build_save=build_save, build_restore=build_restore)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 781, in _build_internal
    restore_sequentially, reshape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 422, in _AddRestoreOps
    assign_ops.append(saveable.restore(saveable_tensors, shapes))
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 113, in restore
    self.op.get_shape().is_fully_defined())
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\state_ops.py", line 219, in assign
    validate_shape=validate_shape)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\gen_state_ops.py", line 63, in assign
    use_locking=use_locking, name=name)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
    op_def=op_def)
  File "C:\Users\11327\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\ops.py", line 1740, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save/Assign_15 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save/RestoreV2:15)]]


Process finished with exit code 1

小白心里苦~没有解决!

试着修改为不同的参数,再次执行train_ssd_network.py

报错如下:

2019-03-12 13:44:13.579121: E c:\users\user\source\repos\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:332] could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2019-03-12 13:44:13.579885: E c:\users\user\source\repos\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:332] could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED

Process finished with exit code -1073741819 (0xC0000005)
--train_dir=./logs/
--dataset_dir=./tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--checkpoint_path=./checkpoints/vgg_16.ckpt
--checkpoint_model_scope=vgg_16
--checkpoint_exclude_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vgg/block9,ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ssd_300_vgg/block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box
--trainable_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vgg/block9,ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ssd_300_vgg/block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box

使用参数如下(windows10+pycharm):参考:https://blog.csdn.net/comway_Li/article/details/85239484
--train_dir=./logs/
--dataset_dir=./tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--checkpoint_path=./checkpoints/vgg_16.ckpt
--checkpoint_model_scope=vgg_16
--checkpoint_exclude_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vgg/block9,ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ssd_300_vgg/block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box
--trainable_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vgg/block9,ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ssd_300_vgg/block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box
--save_summaries_secs=60
--save_interval_secs=600
--weight_decay=0.0005
--optimizer=adam
--learning_rate=0.001
--learning_rate_decay_factor=0.94
--batch_size=16
--gpu_memory_fraction=0.9

报错(一部分信息):

NotFoundError (see above for traceback): Key ssd_300_vgg/conv1/conv1_1/biases/Adam not found in checkpoint
     [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_INT64, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

 

再次修改参数:参考https://blog.csdn.net/comway_Li/article/details/85240291

--train_dir=./logs/
--dataset_dir=./tfrecords/
--dataset_name=pascalvoc_2007
--dataset_split_name=train
--model_name=ssd_300_vgg
--checkpoint_path=./checkpoints/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt
--save_summaries_secs=60
--save_interval_secs=600
--weight_decay=0.0005
--optimizer=adam
--learning_rate=0.001
--batch_size=16

还是不行,报错:Error reported to Coordinator: , Assign requires shapes of both tensors to match. lhs shape= [8] rhs shape= [84]
     [[Node: save_1/Assign_4 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block10_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ssd_300_vgg/block10_box/conv_cls/biases, save_1/RestoreV2:4)]]
小白哭了,真的解决不了~

解决:后来运行demo测试小程序也是出这个错误,评估程序也是,同一个错误,不知道为什么,后来重启了一下电脑,把电脑管家之类的全部都关了,再打开pycharm,路径改成我自己训练的模型,就解决了。(小白自己猜的可能是因为在win1

上跑的,不稳定,容易出错)

 

你可能感兴趣的:(win10 tensorflow ssd用自己的数据集报错Assign requires shapes of both tensors to match. lhs shape= [8] rhs sha)