Similar to TFlearn implementation :param input: input of the PReLU which is output of a layer. :return: The output.
(input,scope)
| 69 | return arg_sc |
| 70 | |
| 71 | def PReLU(input,scope): |
| 72 | """ |
| 73 | Similar to TFlearn implementation |
| 74 | :param input: input of the PReLU which is output of a layer. |
| 75 | :return: The output. |
| 76 | """ |
| 77 | alphas = tf.get_variable(scope, input.get_shape()[-1], |
| 78 | initializer=tf.constant_initializer(0.0), |
| 79 | dtype=tf.float32) |
| 80 | |
| 81 | return tf.nn.relu(input) + alphas * (input - abs(input)) * 0.5 |
| 82 | |
| 83 | end_points = {} |
| 84 |