40db92599e7607b97f5b52a4d6a90bef9612c317,kronecker.py,,slog_determinant,#Any#,44
Before Change
"(tt-ranks should be 1)")
pows = 1
for core_idx in range(kron_a.ndims()):
core = kron_a.tt_cores[core_idx]
if core.get_shape()[1] != core.get_shape()[2]:
raise ValueError("The argument should be a Kronecker product of square"
"matrices (tt-cores must be square)")
pows *= core.get_shape()[1].value
logdet = 0
det_sign = 1
for core_idx in range(kron_a.ndims()):
core = kron_a.tt_cores[core_idx]
After Change
raise ValueError("The argument should be a Kronecker product "
"(tt-ranks should be 1)")
shapes_defined = kron_a.get_shape().is_fully_defined()
if shapes_defined:
i_shapes = kron_a.get_raw_shape()[0]
j_shapes = kron_a.get_raw_shape()[1]
else:
i_shapes = raw_shape(kron_a)[0]
if shapes_defined:
if i_shapes != j_shapes:
raise ValueError("The argument should be a Kronecker product of square "
"matrices (tt-cores must be square)")
pows = tf.cast(tf.reduce_prod(i_shapes), kron_a.dtype)
logdet = 0.
det_sign = 1.
for core_idx in range(kron_a.ndims()):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: Bihaqo/t3f
Commit Name: 40db92599e7607b97f5b52a4d6a90bef9612c317
Time: 2017-02-11
Author: izmailovpavel@gmail.com
File Name: kronecker.py
Class Name:
Method Name: slog_determinant
Project Name: keras-team/keras
Commit Name: 9bc2e60fd587389701c077f5bbff69250d6fb0b1
Time: 2016-09-07
Author: kuza55@gmail.com
File Name: keras/callbacks.py
Class Name: TensorBoard
Method Name: _set_model
Project Name: Bihaqo/t3f
Commit Name: 330154d9f5344f0a6ab39b3a313626c4b574dbbd
Time: 2017-02-11
Author: izmailovpavel@gmail.com
File Name: kronecker.py
Class Name:
Method Name: determinant
Project Name: Bihaqo/t3f
Commit Name: 40db92599e7607b97f5b52a4d6a90bef9612c317
Time: 2017-02-11
Author: izmailovpavel@gmail.com
File Name: kronecker.py
Class Name:
Method Name: slog_determinant