keunwoochoi / lstm_real_book

LSTM source code to generate jazz chord progressions
130 stars 18 forks source link

sentences 관련 질문드려요 #4

Closed kissshot93 closed 5 years ago

kissshot93 commented 5 years ago

안녕하세요, git에 올린걸 통해서 악보 작성을 실행중인데, 올려주신 걸로 실행시키면 NameError Traceback (most recent call last) in () 148 149 if name=='main': --> 150 main(character_mode=False)

in main(character_mode) 73 74 # text to vectors ---> 75 X, y = vectorize() 76 # build the model: stacked LSTM 77 model = get_model(maxlen, num_chars)

in vectorize() 36 def vectorize(): 37 print('Vectorization...') ---> 38 X = np.zeros((len(sentences), maxlen, num_chars), dtype=np.bool) 39 y = np.zeros((len(sentences), num_chars), dtype=np.bool) 40 for i, sentence in enumerate(sentences):

NameError: name 'sentences' is not define

라고 에러가 뜨네요. sentences랑 sentence가 둘 다 있어서 변수 설정을 어떻게 해야할지 헷갈리는데, 의도하신 sentences가 뭔지 알 수 있을까요?