Chakshu123 commited on
Commit
60c0645
1 Parent(s): 9bd8029

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -138,7 +138,10 @@ class ECCVGenerator(BaseColor):
138
  conv8_3 = self.model8(conv7_3)
139
  out_reg = self.model_out(self.softmax(conv8_3))
140
 
141
- return self.unnormalize_ab(self.upsample4(out_reg))
 
 
 
142
 
143
 
144
  # model_net = torch.load(f'weights/colorizer.pt')
 
138
  conv8_3 = self.model8(conv7_3)
139
  out_reg = self.model_out(self.softmax(conv8_3))
140
 
141
+ x= self.unnormalize_ab(self.upsample4(out_reg))
142
+ zeros = torch.zeros_like(x[:, :1, :, :])
143
+ x = torch.cat([x, zeros], dim=1) # concatenate the tensor of zeros with the input tensor along the channel dimension
144
+ return x
145
 
146
 
147
  # model_net = torch.load(f'weights/colorizer.pt')