(out)
return np.concatenate([out[..., :1],
                         np.zeros(shape_minus_dim + [3]),
                         out[..., 1:3],
                         np.zeros(shape_minus_dim + [3]),
                         out[..., 3:4],
                         np.zeros(shape_minus_dim + [14]),
                         out[..., 4:]], -1)
Converts svg decoder output to format required by some render functions.
Converts svg decoder output to format required by some render functions.
Converts svg decoder output to format required by some render functions .
def make_simple_cmds_long(out):
  """Converts svg decoder output to format required by some render functions."""
  # out has 10 dims
  # the first 4 are respectively dims 0, 4, 5, 9 of the full 20-dim onehot vec
  # the latter 6 are the 6 last dims of the 10-dim arg vec
  shape_minus_dim = list(np.shape(out))[:-1]
  return np.concatenate([out[..., :1],
                         np.zeros(shape_minus_dim + [3]),
                         out[..., 1:3],
                         np.zeros(shape_minus_dim + [3]),
                         out[..., 3:4],
                         np.zeros(shape_minus_dim + [14]),
                         out[..., 4:]], -1)
def make_simple_cmds_long ( out ) : # out has 10 dims # the first 4 are respectively dims 0, 4, 5, 9 of the full 20-dim onehot vec # the latter 6 are the 6 last dims of the 10-dim arg vec shape_minus_dim = list ( np . shape ( out ) ) [ : - 1 ] return np . concatenate ( [ out [ ... , : 1 ] , np . zeros ( shape_minus_dim + [ 3 ] ) , out [ ... , 1 : 3 ] , np . zeros ( shape_minus_dim + [ 3 ] ) , out [ ... , 3 : 4 ] , np . zeros ( shape_minus_dim + [ 14 ] ) , out [ ... , 4 : ] ] , - 1 )