[11ca2d]: / networks / functions.py

Download this file

12 lines (8 with data), 316 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense, Input, Concatenate, Maximum, Dropout, LeakyReLU
from tensorflow.keras.models import Model
def xtanh(x):
return x * tf.keras.activations.tanh(x)
def xsigmoid(x):
return tf.keras.activations.swish(x)