Skip to content

Commit

Permalink
edit dim
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed May 17, 2024
1 parent 873d0fc commit 51fabaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparcscore/ml/plmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def configure_optimizers(self):
def training_step(self, batch):
data, target = batch
print("target training ", target)
target = target.unsqueeze(0) # Add dimension for regression
target = target.unsqueeze(1) # Add dimension for regression
output = self.network(data) # Forward pass, only one output
loss = F.mse_loss(output, target) # L2 loss

Expand All @@ -219,7 +219,7 @@ def training_step(self, batch):

def validation_step(self, batch):
data, target = batch
target = target.unsqueeze(0)
target = target.unsqueeze(1)
print("target val ", target)

output = self.network(data)
Expand Down

0 comments on commit 51fabaf

Please sign in to comment.