Closed yefangwong closed 2 years ago
I solve it.
I am also facing the same problem. How did you solve the issue.
This is the traceback
(myenv) C:\Pradnya\code\SQLNet>python train.py --ca --train_emb
Loading from original dataset
Loading data from data/train_tok.jsonl
Loading data from data/train_tok.tables.jsonl
Loading data from data/dev_tok.jsonl
Loading data from data/dev_tok.tables.jsonl
Loading data from data/test_tok.jsonl
Loading data from data/test_tok.tables.jsonl
Load used word embedding
Using trainable embedding
Using trainable embedding
Using trainable embedding
Using column attention on aggregator predicting
Using column attention on selection predicting
Using column attention on where predicting
Loading from saved_model/old_sqlnet_ca.agg_model
Loading from saved_model/old_sqlnet_ca.sel_model
Loading from saved_model/old_sqlnet_ca.cond_model
Traceback (most recent call last):
File "C:\Pradnya\PhD\code\SQLNet\train.py", line 106, in
I solve it.
how did you solve it?
(SQLNet) yfwong@DESKTOP-JS1B4A9:/mnt/c/Users/user/Documents/Projects/SQLNet_Python3$ python train.py --ca Loading from original dataset Loading data from data/train_tok.jsonl Loading data from data/train_tok.tables.jsonl Loading data from data/dev_tok.jsonl Loading data from data/dev_tok.tables.jsonl Loading data from data/test_tok.jsonl Loading data from data/test_tok.tables.jsonl Loading word embedding from glove/glove.42B.300d.txt Using fixed embedding Using column attention on aggregator predicting Using column attention on selection predicting Using column attention on where predicting Traceback (most recent call last): File "train.py", line 102, in
init_acc = epoch_acc(model, BATCH_SIZE,
File "/mnt/c/Users/user/Documents/Projects/SQLNet_Python3/sqlnet/utils.py", line 205, in epoch_acc
score = model.forward(q_seq, col_seq, col_num,
File "/mnt/c/Users/user/Documents/Projects/SQLNet_Python3/sqlnet/model/sqlnet.py", line 125, in forward
x_emb_var, x_len = self.embed_layer.gen_x_batch(q, col)
File "/mnt/c/Users/user/Documents/Projects/SQLNet_Python3/sqlnet/model/modules/word_embedding.py", line 76, in gen_x_batch
val_emb_array[i,t,:] = val_embs[i][t]
IndexError: index 2 is out of bounds for axis 1 with size 2
Have any ideas? I use python 3.8 and Nvidia RTX 3070, and run in WSL2 on windows 11 thanks!