Closed minkoo01 closed 5 years ago
The output text is below... As I can see since last max pool input size is changed from 13 to 12... I don't understand why its happened... Please help
0 Tensor("yolov3/net1:0", shape=(?, 416, 416, 3), dtype=float32) 1 Tensor("yolov3/convolutional1/Activation:0", shape=(?, 416, 416, 16), dtype=float32) 2 Tensor("yolov3/maxpool1/MaxPool:0", shape=(?, 208, 208, 16), dtype=float32) 3 Tensor("yolov3/convolutional2/Activation:0", shape=(?, 208, 208, 32), dtype=float32) 4 Tensor("yolov3/maxpool2/MaxPool:0", shape=(?, 104, 104, 32), dtype=float32) 5 Tensor("yolov3/convolutional3/Activation:0", shape=(?, 104, 104, 64), dtype=float32) 6 Tensor("yolov3/maxpool3/MaxPool:0", shape=(?, 52, 52, 64), dtype=float32) 7 Tensor("yolov3/convolutional4/Activation:0", shape=(?, 52, 52, 128), dtype=float32) 8 Tensor("yolov3/maxpool4/MaxPool:0", shape=(?, 26, 26, 128), dtype=float32) 9 Tensor("yolov3/convolutional5/Activation:0", shape=(?, 26, 26, 256), dtype=float32) 10 Tensor("yolov3/maxpool5/MaxPool:0", shape=(?, 13, 13, 256), dtype=float32) 11 Tensor("yolov3/convolutional6/Activation:0", shape=(?, 13, 13, 512), dtype=float32) 12 Tensor("yolov3/maxpool6/MaxPool:0", shape=(?, 12, 12, 512), dtype=float32) 13 Tensor("yolov3/convolutional7/Activation:0", shape=(?, 12, 12, 1024), dtype=float32) 14 Tensor("yolov3/convolutional8/Activation:0", shape=(?, 12, 12, 256), dtype=float32) 15 Tensor("yolov3/convolutional9/Activation:0", shape=(?, 12, 12, 512), dtype=float32) 16 Tensor("yolov3/convolutional10/BiasAdd:0", shape=(?, 12, 12, 30), dtype=float32) 17 Tensor("yolov3/convolutional10/BiasAdd:0", shape=(?, 12, 12, 30), dtype=float32) 18 Tensor("yolov3/route1:0", shape=(?, 12, 12, 256), dtype=float32) 19 Tensor("yolov3/convolutional11/Activation:0", shape=(?, 12, 12, 128), dtype=float32) 20 Tensor("yolov3/upsample1:0", shape=(?, 24, 24, 128), dtype=float32) Traceback (most recent call last): File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1589, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimension 1 in both shapes must be equal, but are 24 and 26. Shapes are [?,24,24] and [?,26,26]. for 'yolov3/route2' (op: 'ConcatV2') with input shapes: [?,24,24,128], [?,26,26,128], [] and with computed input tensors: input[2] = <-1>. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "DW2TF/main.py", line 111, in <module> main(args) File "DW2TF/main.py", line 52, in main parse_net(args.layers, args.cfg, args.weights, args.training) File "DW2TF/main.py", line 32, in parse_net training=training, const_inits=const_inits, verbose=verbose) File "/raid/jupyterhub/notebook/sg180824/minkoo/yolo/DW2TF/util/cfg_layer.py", line 197, in get_cfg_layer layer = _cfg_layer_dict.get(layer_name, cfg_ignore)(B, H, W, C, net, param, weights_walker, stack, output_index, scope, training, const_inits, verbose) File "/raid/jupyterhub/notebook/sg180824/minkoo/yolo/DW2TF/util/cfg_layer.py", line 131, in cfg_route net = tf.concat(nets, axis=-1, name=scope) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1113, in concat return gen_array_ops.concat_v2(values=values, axis=axis, name=name) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1029, in concat_v2 "ConcatV2", values=values, axis=axis, name=name) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3414, in create_op op_def=op_def) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1756, in __init__ control_input_ops) File "/home/sg180824/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1592, in _create_c_op raise ValueError(str(e)) ValueError: Dimension 1 in both shapes must be equal, but are 24 and 26. Shapes are [?,24,24] and [?,26,26]. for 'yolov3/route2' (op: 'ConcatV2') with input shapes: [?,24,24,128], [?,26,26,128], [] and with computed input tensors: input[2] = <-1>.
This was fixed in PR #9. @minkoo01 Did you try to fetch the latest commit and re-run?
@sjain-stanford Oh I got it! I solved after following you said. I really appreciate it 👍
The output text is below... As I can see since last max pool input size is changed from 13 to 12... I don't understand why its happened... Please help