0
num_classes = 2에 대한 SSD를 훈련하고 싶습니다. 이 코드의 링크는 here입니다. 나는 명령 프롬프트에서이 코드 쓰기 :./checkpoints/ssd_300_vgg.ckpt에서 세부 조정. 누락 된 vars 무시 : 거짓
python train_ssd_network.py \
--train_dir=./logs/ \
--dataset_dir=./tfrecords\
--dataset_name=pascalvoc_2012 \
--dataset_split_name=train \
--model_name=ssd_300_vgg \
--checkpoint_path=./checkpoints/ssd_300_vgg.ckpt \
--save_summaries_secs=60 \
--save_interval_secs=600 \
--weight_decay=0.0005 \
--optimizer=adam \
--learning_rate=0.001 \
--batch_size=32
을하지만 난이 오류가있어 ... 몇 가지 지침에 따라 내가 checkpoint_path을 변경하는 이유
start_standard_services=start_standard_services)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\supervisor.py", line 706, in prepare_or_wait_for_session
init_feed_dict=self._init_feed_dict, init_fn=self._init_fn)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\session_manager.py", line 264, in prepare_session
init_fn(sess)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\contrib\framework\python\ops\variables.py", line 655, in callback
saver.restore(session, model_path)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 1457, in restore
{self.saver_def.filename_tensor_name: save_path})
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\client\session.py", line 778, in run
run_metadata_ptr)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\client\session.py", line 982, in _run
feed_dict_string, options, run_metadata)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\client\session.py", line 1032, in _do_run
target_list, options, run_metadata)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\client\session.py", line 1052, 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= [12] rhs shape= [126]
[[Node: save_1/Assign_29 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block8_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](s
sd_300_vgg/block8_box/conv_cls/biases, save_1/RestoreV2_29)]]
Caused by op 'save_1/Assign_29', defined at:
File "train_ssd_network.py", line 390, in <module>
tf.app.run()
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train_ssd_network.py", line 378, in main
init_fn=tf_utils.get_init_fn(FLAGS),
File "F:\Downloads\SSD-Tensorflow-master-\tf_utils.py", line 235, in get_init_fn
ignore_missing_vars=flags.ignore_missing_vars)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\contrib\framework\python\ops\variables.py", line 653, in assign_from_checkpoint_fn
saver = tf_saver.Saver(var_list, reshape=reshape_variables)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 1056, in __init__
self.build()
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 1086, in build
restore_sequentially=self._restore_sequentially)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 691, in build
restore_sequentially, reshape)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 419, in _AddRestoreOps
assign_ops.append(saveable.restore(tensors, shapes))
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\training\saver.py", line 155, in restore
self.op.get_shape().is_fully_defined())
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\ops\state_ops.py", line 270, in assign
validate_shape=validate_shape)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 47, in assign
use_locking=use_locking, name=name)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 768, in apply_op
op_def=op_def)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2336, in create_op
original_op=self._default_original_op, op_def=op_def)
File "C:\Users\User\Anaconda3\envs\python35\lib\site-packages\tensorflow\python\framework\ops.py", line 1228, in __init__
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [12] rhs shape= [126]
[[Node: save_1/Assign_29 = Assign[T=DT_FLOAT, _class=["loc:@ssd_300_vgg/block8_box/conv_cls/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](s
sd_300_vgg/block8_box/conv_cls/biases, save_1/RestoreV2_29)]]
누군가가 나를 도울 수 =/체크 포인트/ssd_300_vgg.을. checkpoint_path =./checkpoints/ssd_300_vgg.ckpt/ssd_300_vgg.ckpt로 ckpt하지만 오류가 발생합니다.