How to create a layer to invert a softmax (TensforFlow,python)?

后端 未结 2 387
迷失自我
迷失自我 2021-01-29 03:02

I am building a deconvolution network. I would like to add a layer to it which is the reverse of a softmax. I tried to write a basic python function that returns the inverse of

2条回答
  •  心在旅途
    2021-01-29 03:16

    Thanks it works ! I put :

    import keras.backend as K
    
    def inv_softmax(x,C):
       return K.log(x)+K.log(C)
    

提交回复
热议问题