tensorflow / community

Stores documents used by the TensorFlow developer community
Apache License 2.0
1.26k stars 580 forks source link

AttributeError: module 'tensorflow._api.v1.keras.losses' has no attribute 'SparseCategoricalCrossentropy' #319

Closed ylzzz closed 4 years ago

ylzzz commented 4 years ago

Hello, I am a beginner, I would like to ask why this problem occurs.Why does it show “module 'tensorflow._api.v1.keras.losses' has no attribute 'SparseCategoricalCrossentropy'”?I want to know how to solve it.Please.Thank you!