Exemplo n.º 1
0
def MpcRandom_gamma(shape,
                    alpha,
                    beta=None,
                    dtype=dtypes.float32,
                    seed=None,
                    name=None):
    dtype = dtype_check_and_set(dtype)
    return random_ops.random_gamma(shape, alpha, beta, dtype, seed, name)
Exemplo n.º 2
0
def MpcTruncated_normal(shape,
                        mean=0.0,
                        stddev=1.0,
                        dtype=dtypes.float32,
                        seed=None,
                        name=None):
    dtype = dtype_check_and_set(dtype)
    return random_ops.truncated_normal(shape, mean, stddev, dtype, seed, name)
Exemplo n.º 3
0
def MpcRandom_uniform(shape,
                      minval=0,
                      maxval=None,
                      dtype=dtypes.float32,
                      seed=None,
                      name=None):
    dtype = dtype_check_and_set(dtype)
    return random_ops.random_uniform(shape, minval, maxval, dtype, seed, name)
Exemplo n.º 4
0
def MpcRandom_normal(shape,
                     mean=0.0,
                     stddev=1.0,
                     dtype=dtypes.float64,
                     seed=None,
                     name=None):
    dtype = dtype_check_and_set(dtype)
    return random_ops.random_normal(shape, mean, stddev, dtype, seed, name)
Exemplo n.º 5
0
def MpcOnes_like(tensor, dtype=None, name=None, optimize=True):
    dtype = dtype_check_and_set(dtype)
    return array_ops.ones_like(tensor, dtype, name)
Exemplo n.º 6
0
def MpcOnes(shape, dtype=dtypes.float64, name=None):
    dtype = dtype_check_and_set(dtype)
    return array_ops.ones(shape, dtype, name)
Exemplo n.º 7
0
def MpcPlaceholder(dtype, shape=None, name=None):
    dtype = dtype_check_and_set(dtype)
    return array_ops.placeholder(dtype, shape, name)
Exemplo n.º 8
0
def MpcConstant(value, dtype=None, shape=None, name="Const", verify_shape=False):
    dtype = dtype_check_and_set(dtype)
    return constant_op.constant_v1(value, dtype, shape, name, verify_shape)
Exemplo n.º 9
0
def MpcRandom_poisson(lam, shape, dtype=dtypes.float32, seed=None, name=None):
    dtype = dtype_check_and_set(dtype)
    #return random_ops.random_poisson(shape, mean, stddev, dtype, seed, name)
    return random_ops.random_poisson(lam, shape, dtype, seed, name)
Exemplo n.º 10
0
 def __init__(self, *args, **kwargs):
     kwargs['dtype'] = dtype_check_and_set(kwargs.get('dtype', None))
     super(MPCRefVariable, self).__init__(*args, **kwargs)