parametric ReLU activation
(_x, scope='')
| 201 | return new_h, new_h |
| 202 | |
| 203 | def prelu(_x, scope=''): |
| 204 | """parametric ReLU activation""" |
| 205 | with tf.variable_scope(name_or_scope=scope, default_name="prelu"): |
| 206 | _alpha = tf.get_variable("prelu_"+scope, shape=_x.get_shape()[-1], |
| 207 | dtype=_x.dtype, initializer=tf.constant_initializer(0.1)) |
| 208 | return tf.maximum(0.0, _x) + _alpha * tf.minimum(0.0, _x) |
| 209 | |
| 210 | def calc_auc(raw_arr): |
| 211 | """Summary |
no outgoing calls
no test coverage detected