Spaces:
Running
Running
update srgan
Browse files
models/SRGAN/srgan-cvprj.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/SRGAN/srgan-dl-prj.ipynb
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:4eb72ac34eeb3831604a783a87d65fe237d7ef6279dce4d99224ffa92f1211b3
|
| 3 |
-
size 12001858
|
|
|
|
|
|
|
|
|
|
|
|
models/SRGAN/srgan.py
CHANGED
|
@@ -42,7 +42,7 @@ class GeneratorResnet(nn.Module):
|
|
| 42 |
]
|
| 43 |
self.upsampling = nn.Sequential(*upsampling)
|
| 44 |
|
| 45 |
-
self.conv3 = nn.
|
| 46 |
|
| 47 |
def forward(self, x):
|
| 48 |
out1 = self.conv1(x)
|
|
@@ -51,7 +51,7 @@ class GeneratorResnet(nn.Module):
|
|
| 51 |
out = torch.add(out1, out2)
|
| 52 |
out = self.upsampling(out)
|
| 53 |
out = self.conv3(out)
|
| 54 |
-
return out
|
| 55 |
|
| 56 |
def inference(self, x):
|
| 57 |
"""
|
|
@@ -62,7 +62,7 @@ class GeneratorResnet(nn.Module):
|
|
| 62 |
x = ToTensor()(x).unsqueeze(0)
|
| 63 |
x = self.forward(x)
|
| 64 |
x = Image.fromarray((x.squeeze(0).permute(1, 2, 0).detach().numpy() * 255).astype('uint8'))
|
| 65 |
-
return
|
| 66 |
|
| 67 |
def test(self, x):
|
| 68 |
"""
|
|
|
|
| 42 |
]
|
| 43 |
self.upsampling = nn.Sequential(*upsampling)
|
| 44 |
|
| 45 |
+
self.conv3 = nn.Conv2d(64, out_channels, kernel_size=9, stride=1, padding=4)
|
| 46 |
|
| 47 |
def forward(self, x):
|
| 48 |
out1 = self.conv1(x)
|
|
|
|
| 51 |
out = torch.add(out1, out2)
|
| 52 |
out = self.upsampling(out)
|
| 53 |
out = self.conv3(out)
|
| 54 |
+
return out
|
| 55 |
|
| 56 |
def inference(self, x):
|
| 57 |
"""
|
|
|
|
| 62 |
x = ToTensor()(x).unsqueeze(0)
|
| 63 |
x = self.forward(x)
|
| 64 |
x = Image.fromarray((x.squeeze(0).permute(1, 2, 0).detach().numpy() * 255).astype('uint8'))
|
| 65 |
+
return x
|
| 66 |
|
| 67 |
def test(self, x):
|
| 68 |
"""
|
models/SRGAN/srgan_checkpoint.pth
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:252142cce821babfd7718b8a9ecb6c795e642d90fe4ccc69072c9317dc4a8982
|
| 3 |
+
size 6336551
|