Customized a little bit Rayleigh
This commit is contained in:
parent
c1b2fba6ee
commit
7f50c7ab83
|
@ -114,8 +114,8 @@ def rayleighDistribution(sigma2):
|
|||
|
||||
def criterion(x, y):
|
||||
f = nn.CrossEntropyLoss(ignore_index=PAD_IDX)
|
||||
ray = rayleighDistribution(0.15)
|
||||
return ray(bp(x.shape[0], y.shape[0]))/1.566055429325195 * f(x, y)
|
||||
ray = rayleighDistribution(0.2)
|
||||
return ray(0.05+bp(x.shape[0], y.shape[0]))/1.356244 * f(x, y)
|
||||
|
||||
|
||||
def train(
|
||||
|
|
Loading…
Reference in New Issue