Skip to content

Conversation

@haichangsi
Copy link
Collaborator

No description provided.

@haichangsi haichangsi added the enhancement New feature or request label May 29, 2023
@haichangsi haichangsi requested review from RooTender and jereml99 May 29, 2023 13:35
@haichangsi haichangsi self-assigned this May 29, 2023
Copy link
Collaborator

@jereml99 jereml99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traning idzie całkiem powolutku mogę obczaić co tam tyle zajmuję
Widzę że są jakieś konflikty z mergem,

self.feature_extractor = resnet50(weights=ResNet50_Weights.DEFAULT)
# Replace the last fully connected layer
# Parameters of newly constructed modules have requires_grad=True by default
num_ftrs = self.feature_extractor.fc.in_features
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A gdzie podajemy liczbę cech na wejście sieci?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Powinniśmy mieć automatycznego lintera xd

def __getitem__(self, idx):
mel_spec, label = self.data[idx]
mel_spec = torch.from_numpy(mel_spec).unsqueeze(0) # Add channel dimension
mel_spec = mel_spec.expand(3, -1, -1) # Expand single channel to three channels
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W sumie dlaczego?

filename=f"{split_name}_bird_classifier_batch_{batch_size}_lr_{learning_rate}",
monitor="val_loss", # The metric to monitor
save_top_k=1, # Save only the top 1 models based on the metric monitored
mode="min", # In 'min' mode, training will stop when the quantity monitored has stopped decreasing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mode="min", # In 'min' mode, training will stop when the quantity monitored has stopped decreasing
mode="min", # In 'min' mode, the model with lowest val_loss is picked

Comment on lines +66 to +67
# Save the trained model (The best model is saved by the checkpoint_callback)
# trainer.save_checkpoint(f"{split_name}_bird_classifier_batch_{batch_size}.ckpt")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do wyrzucenia może być

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fajne


class BirdSpectrogramDataModule(pl.LightningDataModule):
def __init__(self, root_dir, batch_size=16):
def __init__(self, root_dir, batch_size=16, num_workers=4):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Collaborator

@jereml99 jereml99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traning idzie całkiem powolutku mogę obczaić co tam tyle zajmuję
Widzę że są jakieś konflikty z mergem,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants