Skip to content
Snippets Groups Projects
Commit ba3f047a authored by kreuzer's avatar kreuzer
Browse files

Argumente Subklassen

parent 78c81546
No related branches found
No related tags found
No related merge requests found
......@@ -107,9 +107,9 @@ class SummarisationModel(nn.Module):
class ActorOnlySummarisationModel(SummarisationModel):
def __init__(self):
def __init__(self, gpu):
super().__init__()
super().__init__(gpu)
self.optimizer = torch.optim.Adam(self.parameters(), lr=0.001)
......@@ -162,9 +162,9 @@ class ActorOnlySummarisationModel(SummarisationModel):
class SummarisationModelWithCrossEntropyLoss(SummarisationModel):
def __init__(self):
def __init__(self, gpu):
super().__init__()
super().__init__(gpu)
self.loss_fn = nn.BCELoss(reduction='sum')
self.optimizer = torch.optim.Adam(self.parameters(), lr=0.001)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment