quick fix
This commit is contained in:
1 parent
5ab6304277
commit
99d213f6cf
3 files changed
+9
-11
No files matched your search
+4
-4
@@ -6,12 +6,12 @@ hparams:
|
|||||||
lr: 0.001
|
lr: 0.001
|
||||||
accumulate_grad_batches: 1
|
accumulate_grad_batches: 1
|
||||||
gradient_clip_val: 0.5
|
gradient_clip_val: 0.5
|
||||||
lin1_size: 256
|
|
||||||
lin2_size: 256
|
|
||||||
lin3_size: 128
|
|
||||||
output_size: 10
|
output_size: 10
|
||||||
weight_decay: 0.000001
|
weight_decay: 0.000001
|
||||||
split_ratio: 0.9
|
split_ratio: 0.9
|
||||||
|
lin1_size: 256
|
||||||
|
lin2_size: 256
|
||||||
|
lin3_size: 128
|
||||||
|
|
||||||
resume:
|
resume:
|
||||||
resume_from_ckpt: False
|
resume_from_ckpt: False
|
||||||
@@ -25,7 +25,7 @@ loggers:
|
|||||||
group: None
|
group: None
|
||||||
job_type: "train"
|
job_type: "train"
|
||||||
tags: []
|
tags: []
|
||||||
log_model: True
|
log_model: False
|
||||||
offline: False
|
offline: False
|
||||||
|
|
||||||
callbacks:
|
callbacks:
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ from pl_bolts.models.regression import LinearRegression, LogisticRegression
|
|||||||
from torch.nn.functional import one_hot
|
from torch.nn.functional import one_hot
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
import pytorch_lightning as pl
|
import pytorch_lightning as pl
|
||||||
import torch
|
|
||||||
import wandb
|
|
||||||
|
|
||||||
# custom models
|
# custom models
|
||||||
from pipeline_modules.models import *
|
from pipeline_modules.models import *
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class SimpleLinearMNIST(nn.Module):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
# mnist images are (1, 28, 28) (channels, width, height)
|
# mnist images are (1, 28, 28) (channels, width, height)
|
||||||
self.model.fc = nn.Sequential(
|
self.model = nn.Sequential(
|
||||||
nn.Linear(self.model.fc.in_features, config["lin1_size"]),
|
nn.Linear(28 * 28, config["lin1_size"]),
|
||||||
nn.BatchNorm1d(config["lin1_size"]),
|
nn.BatchNorm1d(config["lin1_size"]),
|
||||||
nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Dropout(p=0.3),
|
nn.Dropout(p=0.3),
|
||||||
@@ -43,13 +43,12 @@ class EfficientNetPretrained(nn.Module):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.model = EfficientNet.from_pretrained('efficientnet-b1')
|
self.model = EfficientNet.from_pretrained('efficientnet-b1')
|
||||||
# self.model = EfficientNet.from_pretrained('efficientnet-b7')
|
|
||||||
|
|
||||||
for param in self.model.parameters():
|
for param in self.model.parameters():
|
||||||
param.requires_grad = False
|
param.requires_grad = False
|
||||||
|
|
||||||
self.model.fc = nn.Sequential(
|
self.model._fc = nn.Sequential(
|
||||||
nn.Linear(self.model.fc.in_features, config["lin1_size"]),
|
nn.Linear(self.model._fc.in_features, config["lin1_size"]),
|
||||||
nn.BatchNorm1d(config["lin1_size"]),
|
nn.BatchNorm1d(config["lin1_size"]),
|
||||||
nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Dropout(p=0.25),
|
nn.Dropout(p=0.25),
|
||||||
|
|||||||
Reference in new issue
Block a user