pschwllr/MolecularTransformer

problem collection I’ve met and solved,遇到的问题及解决。

Closed this issue · 0 comments

  1. when preprocess.py
    P: TypeError: reduce_ex() takes exactly one argument (0 given)
    W: Replace python3.7 with 3.6
  2. when translate.py
    P:RuntimeError: index_select(): Expected dtype int32 or int64 for index
    W: change ALL ”select_indices = batch_index.view(-1) ” into ”select_indices = batch_index.view(-1).int()”
  3. when score_predictions.py
    P: ValueError("Length of values does not match length of index")
    W: the arguments(-beam_size and -n_best) in preprocess.py must >the arguments(-beam_size) in score_predictions.py,finally we can get top 1,3,5,10 accuracy as we want
    BTW: my environment is python3.6(≤3.6),pytorch1.8(it doesn't matter)