def move_right_permutation():
   return util.prefer_static_value(
       array_ops.concat([
           math_ops.range(0, source_idx, dtype=dtype),
           math_ops.range(source_idx+1, dest_idx+1, dtype=dtype),
           [source_idx],
           math_ops.range(dest_idx+1, ndims, dtype=dtype)], axis=0))
Пример #2
0
 def move_right_permutation():
   return util.prefer_static_value(
       array_ops.concat([
           math_ops.range(0, source_idx, dtype=dtype),
           math_ops.range(source_idx+1, dest_idx+1, dtype=dtype),
           [source_idx],
           math_ops.range(dest_idx+1, ndims, dtype=dtype)], axis=0))
Пример #3
0
 def move_left_permutation():
     return util.prefer_static_value(
         tf.concat([
             tf.range(0, dest_idx, dtype=dtype), [source_idx],
             tf.range(dest_idx, source_idx, dtype=dtype),
             tf.range(source_idx + 1, ndims, dtype=dtype)
         ],
                   axis=0))
Пример #4
0
 def move_left_permutation():
   return util.prefer_static_value(
       tf.concat(
           [
               tf.range(0, dest_idx, dtype=dtype), [source_idx],
               tf.range(dest_idx, source_idx, dtype=dtype),
               tf.range(source_idx + 1, ndims, dtype=dtype)
           ],
           axis=0))