Radhi
Radhi

Reputation: 6339

TypeError: reduce_sum() got an unexpected keyword argument 'keep_dims' in TF 2.0

I update my code to use Tensorflow 2.0 from earlier version. while compiling model it throws error :

TypeError: reduce_sum() got an unexpected keyword argument 'keep_dims'

Do i need to make any specific changes for this in my code?

Upvotes: 0

Views: 4733

Answers (1)

nessuno
nessuno

Reputation: 27050

It is keepdims, not keep_dims. See https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/math/reduce_sum

Upvotes: 2

Related Questions