deb2ac21ce6952b865fb46a5943f7271029f430e,t3f/initializers.py,,tensor_ones,#Any#,10
Before Change
shape = np.array(shape)
if len(shape.shape) != 1:
raise ValueError("shape should be 1d array")
if np.any(shape < 1):
raise ValueError("all elements in `shape` should be positive")
if not all(isinstance(sh, np.integer) for sh in shape):
raise ValueError("all elements in `shape` should be integers")
num_dims = shape.size
tt_rank = np.ones(num_dims + 1)
tt_cores = num_dims * [None]
After Change
shape = np.array(shape)
_validate_input_parameters(is_tensor=True, shape=shape)
num_dims = shape.size
tt_rank = np.ones(num_dims + 1)
tt_cores = num_dims * [None]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 23
Instances
Project Name: Bihaqo/t3f
Commit Name: deb2ac21ce6952b865fb46a5943f7271029f430e
Time: 2018-01-06
Author: khrulkov.v@gmail.com
File Name: t3f/initializers.py
Class Name:
Method Name: tensor_ones
Project Name: Bihaqo/t3f
Commit Name: deb2ac21ce6952b865fb46a5943f7271029f430e
Time: 2018-01-06
Author: khrulkov.v@gmail.com
File Name: t3f/initializers.py
Class Name:
Method Name: tensor_zeros
Project Name: Bihaqo/t3f
Commit Name: deb2ac21ce6952b865fb46a5943f7271029f430e
Time: 2018-01-06
Author: khrulkov.v@gmail.com
File Name: t3f/initializers.py
Class Name:
Method Name: tensor_ones
Project Name: Bihaqo/t3f
Commit Name: deb2ac21ce6952b865fb46a5943f7271029f430e
Time: 2018-01-06
Author: khrulkov.v@gmail.com
File Name: t3f/initializers.py
Class Name:
Method Name: eye