-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResNet encoder not able to testing. #179
Comments
I had same issue. Your solution works like a charm @bruno-krinski |
@bruno-krinski in main(_) /home/xieyan/test/KittiSeg/incl/tensorvision/train.py in do_training(hypes) /home/xieyan/test/KittiSeg/incl/tensorvision/core.py in start_tv_session(hypes) /home/xieyan/test/KittiSeg/hypes/../encoder/resnet.py in _initalize_variables(hypes) |
The link: ftp://mi.eng.cam.ac.uk/pub/mttt2/models/tensorflow_resnet/ I take it here: #30 |
Thank you very much!!! |
I use VPN it can download!!! |
Hello. Someone can help me? I trained with the resnet50 and resnet101 models as encoder. The training and validation steps run without problem. But in the test step, this error occurs. Someone have some idea why? with the VGG-16 i testes without problems.
I tensorflow/core/kernels/logging_ops.cc:79] Shape of upscore2[1 16 16 2]
I tensorflow/core/kernels/logging_ops.cc:79] Shape of upscore4[1 32 32 2]
I tensorflow/core/kernels/logging_ops.cc:79] Shape of upscore32[1 256 256 2]
2018-07-11 16:19:10,358 INFO Evaluation Succesfull. Results:
2018-07-11 16:19:10,358 INFO [train] MaxF1 : 74.3414
2018-07-11 16:19:10,358 INFO [train] BestThresh : 88.2353
2018-07-11 16:19:10,359 INFO [train] Average Precision : 75.0402
2018-07-11 16:19:10,359 INFO [val] MaxF1 : 71.1898
2018-07-11 16:19:10,359 INFO [val] BestThresh : 86.6667
2018-07-11 16:19:10,359 INFO [val] Average Precision : 70.6470
2018-07-11 16:19:10,359 INFO Speed (msec) : 55.3155
2018-07-11 16:19:10,360 INFO Speed (fps) : 18.0781
2018-07-11 16:20:22,013 INFO Creating output on test data.
2018-07-11 16:20:22,017 INFO f: <open file 'RUNS/DUTOMRON_resnet50_fcn_2018_07_11_13.14/model_files/hypes.json', mode 'r' at 0x7f550865cdb0>
Traceback (most recent call last):
File "evaluate.py", line 122, in
tf.app.run()
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "evaluate.py", line 113, in main
kitti_test.do_inference(logdir)
File "incl/evaluation/kitti_test.py", line 132, in do_inference
image=image)
File "incl/tensorvision/core.py", line 137, in build_inference_graph
logits = modules['arch'].inference(hypes, image, train=False)
File "RUNS/DUTOMRON_resnet50_fcn_2018_07_11_13.14/model_files/architecture.py", line 72, in inference
x = _conv(x, 64, ksize=7, stride=2)
File "RUNS/DUTOMRON_resnet50_fcn_2018_07_11_13.14/model_files/architecture.py", line 319, in _conv
weight_decay=CONV_WEIGHT_DECAY)
File "RUNS/DUTOMRON_resnet50_fcn_2018_07_11_13.14/model_files/architecture.py", line 308, in _get_variable
trainable=trainable)
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable
custom_getter=custom_getter)
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable
custom_getter=custom_getter)
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 348, in get_variable
validate_shape=validate_shape)
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter
caching_device=caching_device, validate_shape=validate_shape)
File "/home/bakrinski/anaconda2/envs/KittiSeg/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 660, in _get_single_variable
"but instead was %s." % (name, shape))
ValueError: Shape of a new variable (scale1/weights) must be fully defined, but instead was (7, 7, ?, 64).
well, i found the problem. It worked after i add the line "image.set_shape([1, None, None, 3])" in the do_inference function in kitti_test.py file. Bellow the line "image = tf.expand_dims(image_pl, 0)". I copied from the do_analyze function in analyze.py file.
The text was updated successfully, but these errors were encountered: