sketch_rnn.py
def purify(strokes):
    """removes to small or too long sequences + removes large gaps"""
    data = []
    for seq in strokes:
        if seq.shape[0] <= hp.max_seq_length and seq.shape[0] > 10:
            seq = np.minimum(seq, 1000)
            seq = np.maximum(seq, -1000)
            seq = np.array(seq, dtype=np.float32)
            data.append(seq)
    return data
removes to small or too long sequences + removes large gaps
removes to small or too long sequences + removes large gaps
removes to small or too long sequences + removes large gaps
def purify(strokes):
    data = []
    for seq in strokes:
        if seq.shape[0] <= hp.max_seq_length and seq.shape[0] > 10:
            seq = np.minimum(seq, 1000)
            seq = np.maximum(seq, -1000)
            seq = np.array(seq, dtype=np.float32)
            data.append(seq)
    return data
def purify ( strokes ) : data = [ ] for seq in strokes : if seq . shape [ 0 ] <= hp . max_seq_length and seq . shape [ 0 ] > 10 : seq = np . minimum ( seq , 1000 ) seq = np . maximum ( seq , - 1000 ) seq = np . array ( seq , dtype = np . float32 ) data . append ( seq ) return data
removes to small or too long sequences + removes large gaps
removes to small or too long sequences + removes large gaps
"""removes to small or too long sequences + removes large gaps"""
strokes