unable to create tf.variables inside a function that is decorated with @tf.function #51453
Labels
comp:tf.function
tf.function related issues
stat:awaiting tensorflower
Status - Awaiting response from tensorflower
TF 2.5
Issues related to TF 2.5
type:bug
Bug
tf 2.5
I have a function like above that would be called about 50 times, each time it should generate a new variable and return. But according to the rule and the hint below,
I should define the weight variable outside the tf.function, which means I should manually define over 50 weight variables, each line with a weight variable.
Undoubtedly, this kind of behavior is really stupid, any solutions to this kind of unreasonable rule?
The text was updated successfully, but these errors were encountered: