Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mish class inheriting from Lamda layer #57

Closed
wants to merge 3 commits into from

Conversation

lmontier
Copy link
Contributor

No description provided.


return x


class Mish(Lambda):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmontier je comprends pas à quoi sert cette classe: c'est la même chose que Lambda(function=tfa.activations.mish) et elle ne sert qu'une seule fois.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntoineToubhans je crois que c'est pour qu'elle apparaisse de manière plus friendly dans le plot_model de Keras, mais je suis pas hyper chaud pour merger non plus

Copy link
Contributor Author

@lmontier lmontier Jun 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntoineToubhans @RaphaelMeudec , ça fait deux choses :

  • On mélange des keras.layer et des keras.functions dans nos models, ce qui fait que notamment la function plot_model de keras crash (mais je me dis que peut être d'autres utilis peuvent péter également...). Il me semble que Clément nous avais également indiqué ce genre de retour. D'où le Lambda(function=tfa.activations.mish) ou le Mish()
  • Utiliser Lambda(function=tfa.activations.mish) fait que quand tu examines ton modèle (ou que tu le plot), le nom de tes layers s'appellent "Lambda_x" , alors que si tu redéfinis une classe "Mish", ils s'appelleront "Mish_x"... C'est assez chiant car on utilise ailleurs d'autre Lambda... J'ai essayé de faire autrement, genre forcer le name=... mais pour ça il faut avoir accès à ton index du layer et je n'ai pas réussi. Si vous savez comment faire ça par contre je suis chaud!

@RaphaelMeudec
Copy link
Collaborator

Closing this PR as it will be integrated with #60 along with the TFLite converter

@RaphaelMeudec RaphaelMeudec deleted the refacto-mish-in-a-lambda branch July 7, 2020 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants