Skip to content

Commit

Permalink
delete print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed May 17, 2024
1 parent 45ee884 commit 807bc71
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/sparcscore/ml/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ def __getitem__(self, idx):
idx = idx.tolist() # convert tensor to list

data_item = self.data_locator[idx] # get the data info for the current index, such as target, handle id, and row

#print(f"Getting data for index {idx}...")

if self.select_channel is not None: # select a specific channel
cell_tensor = self.handle_list[data_item[1]][data_item[2], self.select_channel]
Expand Down
14 changes: 0 additions & 14 deletions src/sparcscore/ml/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,10 @@ def vgg(cfg, in_channels, **kwargs):
return model

def forward(self, x):
print("x.shape before norm", x.shape)
x = self.norm(x)
print("x.shape after norm", x.shape)
x = self.features(x)
print("x.shape after features", x.shape)

x = torch.flatten(x, 1)
print("x.shape after flatten", x.shape)

x = self.classifier(x)
print("x.shape after classifier", x.shape)

print(x, x.shape)

x_sq = torch.squeeze(x)

print(x_sq, x_sq.shape)

return x

### CAE Model Architecture
Expand Down
1 change: 0 additions & 1 deletion src/sparcscore/ml/plmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ def configure_optimizers(self):

def training_step(self, batch):
data, target = batch
print("target training ", target)
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 Down

0 comments on commit 807bc71

Please sign in to comment.