PushkarA07 commited on
Commit
2843087
1 Parent(s): 3a3622c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -139,9 +139,7 @@ class PatchDiscriminator(nn.Module):
139
  # activation for the last layer of the model
140
  self.model = nn.Sequential(*model)
141
 
142
- # when needing to make some repeatitive blocks of layers,
143
  def get_layers(self, ni, nf, k=4, s=2, p=1, norm=True, act=True):
144
- # it's always helpful to make a separate method for that purpose
145
  layers = [nn.Conv2d(ni, nf, k, s, p, bias=not norm)]
146
  if norm:
147
  layers += [nn.BatchNorm2d(nf)]
@@ -350,6 +348,9 @@ def log_results(loss_meter_dict):
350
 
351
 
352
  # pip install fastai==2.4
 
 
 
353
 
354
 
355
  def build_res_unet(n_input=1, n_output=2, size=256):
 
139
  # activation for the last layer of the model
140
  self.model = nn.Sequential(*model)
141
 
 
142
  def get_layers(self, ni, nf, k=4, s=2, p=1, norm=True, act=True):
 
143
  layers = [nn.Conv2d(ni, nf, k, s, p, bias=not norm)]
144
  if norm:
145
  layers += [nn.BatchNorm2d(nf)]
 
348
 
349
 
350
  # pip install fastai==2.4
351
+ from fastai.vision.learner import create_body
352
+ from torchvision.models.resnet import resnet18
353
+ from fastai.vision.models.unet import DynamicUnet
354
 
355
 
356
  def build_res_unet(n_input=1, n_output=2, size=256):