I was using opposite ray all this time...
This commit is contained in:
parent
c5519bfcc4
commit
62cf809646
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue