addons icon indicating copy to clipboard operation
addons copied to clipboard

seq2seq.BahdanauAttention raise TypeError: probability_fn is not an instance of str

Open BrandonStudio opened this issue 2 years ago • 9 comments

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): both Windows and Colab
  • TensorFlow version and how it was installed (source or binary): stable latest, pip
  • TensorFlow-Addons version and how it was installed (source or binary): stable latest
  • Python version: 3.10 / 3.9
  • Is GPU used? (yes/no): yes

Describe the bug

call BahdanauAttention with default probability_fn value ("softmax") raises type error

Tried to debug and found that probability_fn was a function when checking type

Code to reproduce the issue

import tensorflow_addons as tfa
tfa.seq2seq.BahdanauAttention(1, 1, 1, normalize=False, name='BahdanauAttention')

Other info / logs

BrandonStudio avatar Mar 19 '23 07:03 BrandonStudio