Traceback (most recent call last):
File "G:/Kiristingna/nlp_segment_analyse/sentiment/classifier/BiLSTM_ATT.py", line 257, in <module>
bilstm_att_wv(index_dict.tolist(), word_vectors.tolist(), sequences, y)
File "G:/Kiristingna/nlp_segment_analyse/sentiment/classifier/BiLSTM_ATT.py", line 162, in bilstm_att_wv
model.add(AttentionLayer())
File "D:\Program Files (x86)\Python\lib\site-packages\keras\models.py", line 489, in add
output_tensor = layer(self.outputs[0])
File "D:\Program Files (x86)\Python\lib\site-packages\keras\engine\topology.py", line 603, in __call__
output = self.call(inputs, **kwargs)
File "G:\Kiristingna\nlp_segment_analyse\sentiment\classifier\Attention.py", line 87, in call
weighted_input = att * x
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\ops\math_ops.py", line 821, in binary_op_wrapper
return func(x, y, name=name)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1044, in _mul_dispatch
return gen_math_ops._mul(x, y, name=name)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 1434, in _mul
result = _op_def_lib.apply_op("Mul", x=x, y=y, name=name)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 768, in apply_op
op_def=op_def)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 2338, in create_op
set_shapes_for_outputs(ret)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 1719, in set_shapes_for_outputs
shapes = shape_func(op)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 1669, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "D:\Program Files (x86)\Python\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimensions must be equal, but are 100 and 250 for 'attention_layer_1/mul_1' (op: 'Mul') with input shapes: [?,1,100], [?,?,250].
I implement attention model
and got this