I was using opposite ray all this time...

This commit is contained in:
i.ortega 2020-05-11 11:42:28 +02:00
parent c5519bfcc4
commit 62cf809646
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ def rayleighDistribution(sigma2):
def criterion(x, y):
f = nn.CrossEntropyLoss(ignore_index=PAD_IDX)
ray = rayleighDistribution(0.2)
return ray(0.05+bp(x.shape[0], y.shape[0]))/1.356244 * f(x, y)
ray = lambda x: rayleighDistribution(20)(x*5.8+0.2)
return (1 - ray(bp(x.shape[0], y.shape[0]))/0.1356243) * f(x, y)
def train(