Update src/loss.py
Browse files- src/loss.py +1 -1
src/loss.py
CHANGED
|
@@ -31,7 +31,7 @@ class ExponentialScalingMatrix(torch.nn.Module):
|
|
| 31 |
super().__init__()
|
| 32 |
self.base = torch.nn.Parameter(torch.ones(size, size)).to('cuda')
|
| 33 |
def forward(self, timestep):
|
| 34 |
-
return self.base * torch.exp(-timestep / 10.0).to('cuda')
|
| 35 |
|
| 36 |
class HierarchicalMatrix(torch.nn.Module):
|
| 37 |
def __init__(self, size):
|
|
|
|
| 31 |
super().__init__()
|
| 32 |
self.base = torch.nn.Parameter(torch.ones(size, size)).to('cuda')
|
| 33 |
def forward(self, timestep):
|
| 34 |
+
return self.base * torch.exp(-torch.tensor(timestep) / 10.0).to('cuda')
|
| 35 |
|
| 36 |
class HierarchicalMatrix(torch.nn.Module):
|
| 37 |
def __init__(self, size):
|