Spaces:
Sleeping
Sleeping
Update resnet_lightning.py
Browse files- resnet_lightning.py +2 -2
resnet_lightning.py
CHANGED
|
@@ -16,7 +16,7 @@ from albumentations.pytorch import ToTensorV2
|
|
| 16 |
|
| 17 |
|
| 18 |
from torch_lr_finder import LRFinder
|
| 19 |
-
|
| 20 |
from pytorch_grad_cam import GradCAM
|
| 21 |
from utils import *
|
| 22 |
|
|
@@ -45,7 +45,7 @@ class BasicBlock(nn.Module):
|
|
| 45 |
return out
|
| 46 |
|
| 47 |
|
| 48 |
-
class ResNet18Model(LightningModule):
|
| 49 |
def __init__(self, data_dir=PATH_DATASETS, block=BasicBlock, num_blocks=[2, 2, 2, 2], num_classes=10):
|
| 50 |
super(ResNet18Model, self).__init__()
|
| 51 |
self.data_dir = data_dir
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
from torch_lr_finder import LRFinder
|
| 19 |
+
import lightning as L
|
| 20 |
from pytorch_grad_cam import GradCAM
|
| 21 |
from utils import *
|
| 22 |
|
|
|
|
| 45 |
return out
|
| 46 |
|
| 47 |
|
| 48 |
+
class ResNet18Model(L.LightningModule):
|
| 49 |
def __init__(self, data_dir=PATH_DATASETS, block=BasicBlock, num_blocks=[2, 2, 2, 2], num_classes=10):
|
| 50 |
super(ResNet18Model, self).__init__()
|
| 51 |
self.data_dir = data_dir
|