Closed heeryoncho closed 5 years ago
When I ran the NLI tutorial (01-nli), I experienced the following two errors:
[Solution 1] I modified the models.py code.
# Sort by length (keep idx) sent_len_sorted, idx_sort = np.sort(sent_len)[::-1], np.argsort(-sent_len) sent_len_sorted = sent_len_sorted.copy() ### Inserted this line. idx_unsort = np.argsort(idx_sort)
[Solution 2] I modified the train_nli.py
### initially it was total_norm = np.sqrt(total_norm) total_norm = np.sqrt(total_norm.cpu()) ### Inserted .cpu()
If anyone is experiencing the same error when trying out the NLI tutorial, the above fix might just work.
Thanks for pointing out the fixes. Updated the repo with these fixes and it seems to work now.
When I ran the NLI tutorial (01-nli), I experienced the following two errors:
[Solution 1] I modified the models.py code.
[Solution 2] I modified the train_nli.py
If anyone is experiencing the same error when trying out the NLI tutorial, the above fix might just work.