* add neptune integration

* improve readme

* quick fix

* improve datamodule

* remove unnecessary folders from .gitignore

* change folder structure

* add optuna config

* add bash tests

* redesign readme.md

* change wandb callbacks names

* fix wandb callbacks

* resolve issues with sweeping alongside wandb

* improve rich config printing

* update readme

* Update README.md
This commit is contained in:
Luke authored and GitHub committed 2021-03-01 15:00:10 +01:00
1 parent bcf4146553
commit 036aec4914
56 files changed
+1294 -837

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
from torch import nn
class SimpleDenseNet(nn.Module):
def __init__(self, hparams):
super().__init__()
self.model = nn.Sequential(
nn.Linear(hparams["input_size"], hparams["lin1_size"]),
nn.BatchNorm1d(hparams["lin1_size"]),
nn.ReLU(),
nn.Dropout(p=hparams["dropout1"]),
nn.Linear(hparams["lin1_size"], hparams["lin2_size"]),
nn.BatchNorm1d(hparams["lin2_size"]),
nn.ReLU(),
nn.Dropout(p=hparams["dropout2"]),
nn.Linear(hparams["lin2_size"], hparams["lin3_size"]),
nn.BatchNorm1d(hparams["lin3_size"]),
nn.ReLU(),
nn.Dropout(p=hparams["dropout3"]),
nn.Linear(hparams["lin3_size"], hparams["output_size"]),
nn.LogSoftmax(dim=1),
)
def forward(self, x):
batch_size, channels, width, height = x.size()
# mnist images are (1, 28, 28) (channels, width, height)
# (b, 1, 28, 28) -> (b, 1*28*28)
x = x.view(batch_size, -1)
return self.model(x)