ValueError: Невозможно сжать dim [1], ожидаемый размер 1, получил 14 для 'tower_0 / joint_embedding / Squeeze' (op: 'Squeeze') с входными формами: [16,14,14,512]
Traceback (most recent call last):
File "train_image_text.py", line 244, in <module>
tf.app.run()
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train_image_text.py", line 240, in main
train_models.train()
File "/net/per610a/export/das18a/satoh-lab/kajalk/new_exp_cm/CMPL/train_models.py", line 240, in train
input_seqs_splits[k], input_masks_splits[k])
File "/net/per610a/export/das18a/satoh-lab/kajalk/new_exp_cm/CMPL/train_models.py", line 76, in _tower_loss
patch_embeddings = build_patch_joint_embeddings(patch_features, scope='patch_joint_embedding')
File "/net/per610a/export/das18a/satoh-lab/kajalk/new_exp_cm/CMPL/modules.py", line 228, in build_patch_joint_embeddings
joint_embeddings = tf.squeeze(joint_embeddings,[1]) # batch_size * patch_size *feature_size
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 2394, in squeeze
return gen_array_ops._squeeze(input, axis, name)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 5202, in _squeeze
"Squeeze", input=input, squeeze_dims=squeeze_dims, name=name)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2958, in create_op
set_shapes_for_outputs(ret)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2209, in set_shapes_for_outputs
shapes = shape_func(op)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2159, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/net/per920a/export/das14a/satoh-lab/kajalk/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Can not squeeze dim[1], expected a dimension of 1, got 14 for 'tower_0/joint_embedding/Squeeze' (op: 'Squeeze') with input shapes: [16,14,14,512].