ops.py 496 字节
Newer Older
Y
Yu Yang 已提交
1
from ..registry import register_layer
Y
Yang Yu 已提交
2 3

__activations__ = [
4
    'abs', 'tanh', 'sigmoid', 'relu', 'sqrt', 'ceil', 'floor', 'log', 'round'
Y
Yu Yang 已提交
5 6
]

Y
Yang Yu 已提交
7 8 9 10 11 12 13 14 15 16 17 18
__all__ = [
    'mean',
    'mul',
    'reshape',
    'scale',
    'transpose',
    'sigmoid_cross_entropy_with_logits',
    'elementwise_add',
    'elementwise_div',
    'elementwise_sub',
    'elementwise_mul',
    'clip',
F
fengjiayi 已提交
19
    'clip_by_norm',
Y
Yang Yu 已提交
20 21 22
    'sequence_softmax',
] + __activations__

Y
Yu Yang 已提交
23 24
for _OP in set(__all__):
    globals()[_OP] = register_layer(_OP)