add posed mesh, metrics, tanh, l1 with gt
This commit is contained in:
@@ -7,12 +7,15 @@ import tensorflow as tf
|
||||
class BiasAct(tf.keras.layers.Layer):
|
||||
def __init__(self, lrmul, act, **kwargs):
|
||||
super(BiasAct, self).__init__(**kwargs)
|
||||
assert act in ['linear', 'lrelu']
|
||||
assert act in ['linear', 'lrelu', 'tanh']
|
||||
self.lrmul = lrmul
|
||||
|
||||
if act == 'linear':
|
||||
self.act = tf.keras.layers.Lambda(lambda x: tf.identity(x))
|
||||
self.gain = 1.0
|
||||
elif act == 'tanh':
|
||||
self.act = tf.keras.layers.Activation('tanh')
|
||||
self.gain = 1.0
|
||||
else:
|
||||
self.act = tf.keras.layers.LeakyReLU(alpha=0.2)
|
||||
self.gain = np.sqrt(2)
|
||||
|
||||
Reference in New Issue
Block a user