Spaces:
Sleeping
Sleeping
Update resnet.py
Browse files
resnet.py
CHANGED
@@ -8,6 +8,23 @@ Reference:
|
|
8 |
"""
|
9 |
import torch.nn as nn
|
10 |
import torch.nn.functional as F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
class BasicBlock(nn.Module):
|
|
|
8 |
"""
|
9 |
import torch.nn as nn
|
10 |
import torch.nn.functional as F
|
11 |
+
# imports
|
12 |
+
import os
|
13 |
+
|
14 |
+
import torch
|
15 |
+
from pytorch_lightning import LightningModule, Trainer
|
16 |
+
from torch import nn
|
17 |
+
from torch.nn import functional as F
|
18 |
+
from torch.utils.data import DataLoader, random_split
|
19 |
+
from torchmetrics import Accuracy
|
20 |
+
from torchvision import transforms
|
21 |
+
from torchvision.datasets import CIFAR10
|
22 |
+
# from pytorch_lightning.callbacks import ModelSummary
|
23 |
+
# from lightning.pytorch.callbacks import ModelCheckpoint
|
24 |
+
from pytorch_lightning.callbacks import ModelCheckpoint, ModelSummary
|
25 |
+
import albumentations as A
|
26 |
+
from albumentations.pytorch import ToTensorV2
|
27 |
+
import torchvision.transforms as transforms
|
28 |
|
29 |
|
30 |
class BasicBlock(nn.Module):
|