Exemplo n.º 1
0
def mean(y, x, axis=DEFAULT, dtype=DEFAULT, keepdims=DEFAULT):
    n = tangent.astype(tangent.array_size(x, axis), x)
    d[x] = tangent.astype(
        tangent.unreduce(d[y], numpy.shape(x), axis, keepdims), x) / n
Exemplo n.º 2
0
def sum(y, x, axis=DEFAULT, dtype=DEFAULT, keepdims=DEFAULT):
    d[x] = tangent.astype(
        tangent.unreduce(d[y], numpy.shape(x), axis, keepdims), x)
Exemplo n.º 3
0
def tunreduce(z, array, shape, axis, keepdims):
    d[z] = tangent.unreduce(d[array], d[shape], axis, keepdims)
Exemplo n.º 4
0
def mean(y, x, axis=None, dtype=None, keepdims=False):
    n = tangent.astype(tangent.array_size(x, axis), x)
    d[x] = tangent.astype(
        tangent.unreduce(d[y], numpy.shape(x), axis, keepdims), x) / n
Exemplo n.º 5
0
def sum(y, x, axis=None, dtype=None, keepdims=False):
    d[x] = tangent.astype(
        tangent.unreduce(d[y], numpy.shape(x), axis, keepdims), x)
Exemplo n.º 6
0
def unbroadcast(y, array, shape):
    d[array] = tangent.unreduce(d[y], numpy.shape(array), None, False)