interpretable-han-for-document-classification-with-keras icon indicating copy to clipboard operation
interpretable-han-for-document-classification-with-keras copied to clipboard

Tensorflow 2 upgrade

Open maryamnikoo opened this issue 3 years ago • 0 comments

Hi,

I have an issue with the dummy layer you defined as:

dummy_layer = Lambda( lambda x: att_layer._get_attention_weights(x) )(prev_tensor)

It is not working in Tensorflow 2. Based on my search, we need to convert it to a subclass layer. Could you please help with this issue? How this subclass layer should be defined inside "show_word_attention(self, x)" function?

Thanks

maryamnikoo avatar Oct 20 '22 01:10 maryamnikoo