(vectors, stop_at_eos=False, categorical=False)
return SVG_PREFIX_BIG + PATH_PREFIX_1 + new_path + PATH_POSFIX_1 + SVG_POSFIX
Tranforms a given vector to an svg string.
Tranforms a given vector to an svg string.
Tranforms a given vector to an svg string .
def vector_to_svg(vectors, stop_at_eos=False, categorical=False):
  """Tranforms a given vector to an svg string."""
  new_path = []
  for vector in vectors:
    if stop_at_eos:
      if categorical:
        try:
          is_eos = np.argmax(vector[:len(CMDS_LIST) + 1]) == 0
        except:
          raise Exception(vector)
      else:
        is_eos = vector[0] < -0.5

      if is_eos:
        break
    new_path.append(' '.join(vector_to_cmd(vector, categorical=categorical)))
  new_path = ' '.join(new_path)
  return SVG_PREFIX_BIG + PATH_PREFIX_1 + new_path + PATH_POSFIX_1 + SVG_POSFIX
def vector_to_svg ( vectors , stop_at_eos = False , categorical = False ) : new_path = [ ] for vector in vectors : if stop_at_eos : if categorical : try : is_eos = np . argmax ( vector [ : len ( CMDS_LIST ) + 1 ] ) == 0 except : raise Exception ( vector ) else : is_eos = vector [ 0 ] < - 0.5 if is_eos : break new_path . append ( ' ' . join ( vector_to_cmd ( vector , categorical = categorical ) ) ) new_path = ' ' . join ( new_path ) return SVG_PREFIX_BIG + PATH_PREFIX_1 + new_path + PATH_POSFIX_1 + SVG_POSFIX