keras-han-for-docla icon indicating copy to clipboard operation
keras-han-for-docla copied to clipboard

han_model.predict_sentence_attention(X)

Open bilalbaloch1 opened this issue 2 years ago • 1 comments

WARNING:tensorflow: The following Variables were used a Lambda layer's call (lambda_4), but are not present in its tracked objects: <tf.Variable 'sentence_attention/W:0' shape=(100, 100) dtype=float32> <tf.Variable 'sentence_attention/context_vector:0' shape=(100, 1) dtype=float32> It is possible that this is intended behavior, but it is more likely an omission. This is a strong indication that this layer should be formulated as a subclassed Layer rather than a Lambda layer.

bilalbaloch1 avatar Mar 22 '22 15:03 bilalbaloch1

Thanks for flagging this. It shouldn't really be an issue since this Lambda layer is only used to create a flow though a subset of the network to get the attention weights. You'll never train it, nor save it. However, it would be nicer indeed to fix this warning. Feel free to make a PR for this!

FlorisHoogenboom avatar Apr 28 '22 11:04 FlorisHoogenboom