Closed anshudaur closed 4 years ago
Try changing MAX_LENGTH defined. It was 50 in our case, could be different in yours. (Try using 500 or more)
Hi, your code is extremely useful for my NLQ project. But I'm stuck in the same problem: "IndexError: index 50 is out of bounds for dimension 0 with size 50". I tried tweaking with the parameters but it did not help and gave the same error after some 3-4 iterations. I also tried giving an if condition at index 50, but it still didn't help. 😢 Please help me in the same regards.
HI, can you please guide me as to why i am getting this error ? this is the error trace
Traceback (most recent call last): File "main.py", line 7, in
baseline.run_baseline()
File ".....NL2SQL\baseline\baseline.py", line 175, in run_baseline
lr_best = hyperparam(hidden_size)
File "...........NL2SQL\baseline\baseline.py", line 82, in hyperparam
trainIters(encoder1, attn_decoder1, 250000, print_every=1000, plot_every=1000,learning_rate=l) #Change number of iter
File ".........\baseline\baseline.py", line 105, in trainIters
decoder, encoder_optimizer, decoder_optimizer, criterion)
File "..............\NL2SQL\baseline\baseline.py", line 34, in train
encoder_outputs[ei] = encoder_output[0, 0]
IndexError: index 50 is out of bounds for dimension 0 with size 50