Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 15_transfer_learning.py #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ipesanz
Copy link

@ipesanz ipesanz commented Jun 14, 2021

Add comment to have a FC layer of the same size as len(class_name)... it was commented on l:138 but not in l:172

Add comment to have a FC layer of the same size as len(class_name)... it was commented on l:138 but in l:172
@@ -167,7 +167,9 @@ def train_model(model, criterion, optimizer, scheduler, num_epochs=25):

# Parameters of newly constructed modules have requires_grad=True by default
num_ftrs = model_conv.fc.in_features
model_conv.fc = nn.Linear(num_ftrs, 2)

# Creating a FC layer of the same size as our categories
Copy link
Owner

Choose a reason for hiding this comment

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

Please move this to line 168 and use this comment:

Creating a FC layer of the same size as our categories.

Parameters of newly constructed layers have requires_grad=True by default

Copy link
Owner

Choose a reason for hiding this comment

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

Looks like a # is rendered as headline here in markdown :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants