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


    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()):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: 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: onnx/onnx-tensorflow
Commit Name: a39084b995d9d6d88300632c54895488985e5cfd
Time: 2017-10-24
Author: gbercea@gheorghodorsmbp.watson.ibm.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_flatten


Project Name: Bihaqo/t3f
Commit Name: 330154d9f5344f0a6ab39b3a313626c4b574dbbd
Time: 2017-02-11
Author: izmailovpavel@gmail.com
File Name: kronecker.py
Class Name:
Method Name: determinant