diff --git a/test.py b/test.py new file mode 100644 index 0000000..0cf703a --- /dev/null +++ b/test.py @@ -0,0 +1,97 @@ +import torch +import torch.nn.functional as F +import config +import json +import numpy as np +from date_build import Chem_Dataset +model=torch.load('D:\models\model3.1(150).pt') + + +def padding( chemic, lens=config.seq_len): + + while len(chemic) < lens: + chemic.append(0) + return chemic + + +def target_padding( chemical, lens=config.seq_len): + chemical.append(1) + while len(chemical)