MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / prelu

Function prelu

DIEN/utils.py:203–208  ·  view source on GitHub ↗

parametric ReLU activation

(_x, scope='')

Source from the content-addressed store, hash-verified

201 return new_h, new_h
202
203def 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
210def calc_auc(raw_arr):
211 """Summary

Callers 3

din_fcn_attentionFunction · 0.85
din_fcn_shineFunction · 0.85
build_fcn_netMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected