示例#1
0
def sum_to(x, shape):
    if x.shape == shape:
        return as_variable(x)
    return SumTo(shape)(x)
示例#2
0
def broadcast_to(x, shape):
    if x.shape == shape:
        return as_variable(x)
    return BroadcastTo(shape)(x)
示例#3
0
def cos(x):
    x = as_variable(x)
    return Cos()(x)
示例#4
0
def tanh(x):
    x = as_variable(x)
    return Tanh()(x)
示例#5
0
def sin(x):
    x = as_variable(x)
    return Sin()(x)