TypeError: softmax () a obtenu un argument de mot clé inattendu 'axis' Activation ('softmax') n'existe pas

Typeerror Softmax Got An Unexpected Keyword Argumentaxisactivation Does Not Exist



TypeError: softmax () a obtenu un argument de mot clé inattendu 'axis'
Ce problème se produit car la version de keras est élevée et il y a un problème avec tensorflow.
Message d'erreur
Solution
1. Rétrograder la version de keras, désinstaller et réinstaller la version spécifiée pip install keras == 2.1
2. Recherchez le répertoire des erreurs, recherchez la ligne sur 3231

def softmax(x, axis=-1): '''Softmax of a tensor. # Arguments x: A tensor or variable. axis: The dimension softmax would be performed on. The default is -1 which indicates the last dimension. # Returns A tensor. ''' return tf.nn.softmax(x,axis=axis)

Changé en



def softmax(x, axis=-1): '''Softmax of a tensor. # Arguments x: A tensor or variable. axis: The dimension softmax would be performed on. The default is -1 which indicates the last dimension. # Returns A tensor. ''' return tf.nn.softmax(x,dim=axis)