Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
coding.

Beybars Mussa beybars1

:electron:
coding.
View GitHub Profile
@beybars1
beybars1 / freeze_example.py
Created Nov 18, 2021 — forked from L0SG/freeze_example.py
PyTorch example: freezing a part of the net (including fine-tuning)
View freeze_example.py
import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
import torch.optim as optim
# toy feed-forward net
class Net(nn.Module):
def __init__(self):