yingkaisha/keras-unet-collection

Add new activation functions

mehrdad-dev opened this issue · 2 comments

How can I add an activation function like tanh for the "output_activation" parameter?
@yingkaisha

Thanks!

Hi @mehrdad-dev, Did you get to know how to add tanh as an output activation function?

you should change the code directly!
like this, and then pass your activation function

if activation:
        if activation == 'Sigmoid':
            X = Activation('sigmoid', name='{}_activation'.format(name))(X)            
        else:
            X = activation(X)