(self)
return np.std(data)
Calculate the normalizing factor explained in appendix of sketch-rnn.
Calculate the normalizing factor explained in appendix of sketch-rnn.
Calculate the normalizing factor explained in appendix of sketch - rnn .
def calculate_normalizing_scale_factor(self):
    """Calculate the normalizing factor explained in appendix of sketch-rnn."""
    data = []
    for i in range(len(self.strokes)):
      if len(self.strokes[i]) > self.max_seq_length:
        continue
      for j in range(len(self.strokes[i])):
        data.append(self.strokes[i][j, 0])
        data.append(self.strokes[i][j, 1])
    data = np.array(data)
    return np.std(data)
def calculate_normalizing_scale_factor ( self ) : data = [ ] for i in range ( len ( self . strokes ) ) : if len ( self . strokes [ i ] ) > self . max_seq_length : continue for j in range ( len ( self . strokes [ i ] ) ) : data . append ( self . strokes [ i ] [ j , 0 ] ) data . append ( self . strokes [ i ] [ j , 1 ] ) data = np . array ( data ) return np . std ( data )