relu6.py 437 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
from .register import register
from x2paddle.core.util import *


def relu6_shape(input_shape):
    return input_shape


def relu6_layer(inputs, input_shape=None, name=None):
    input = inputs[0]
    out = fluid.layers.relu6(x=input)
    return out


def relu6_weights(name, data=None):
    weights_name = []
    return weights_name


register(
    kind='ReLU6',
    shape=relu6_shape,
    layer=relu6_layer,
    weights=relu6_weights)