e87597e058df8aedf24bcd3a1cfe537c44c1d713,models.py,FlowNet2SD,forward,#FlowNet2SD#,292
Before Change
if self.training:
return flow2,flow3,flow4,flow5,flow6
else:
return flow2
class FlowNet2CS(nn.Module):
After Change
def forward(self, inputs):
rgb_mean = inputs.contiguous().view(inputs.size()[:2]+(-1,)).mean(dim=-1).view(inputs.size()[:2] + (1,1,1,))
x = (inputs - rgb_mean) / self.rgb_max
x = torch.cat( (x[:,:,0,:,:], x[:,:,1,:,:]), dim = 1)
out_conv0 = self.conv0(x)
out_conv1 = self.conv1_1(self.conv1(out_conv0))
out_conv2 = self.conv2_1(self.conv2(out_conv1))
out_conv3 = self.conv3_1(self.conv3(out_conv2))
out_conv4 = self.conv4_1(self.conv4(out_conv3))
out_conv5 = self.conv5_1(self.conv5(out_conv4))
out_conv6 = self.conv6_1(self.conv6(out_conv5))
flow6 = self.predict_flow6(out_conv6)
flow6_up = self.upsampled_flow6_to_5(flow6)
out_deconv5 = self.deconv5(out_conv6)
concat5 = torch.cat((out_conv5,out_deconv5,flow6_up),1)
out_interconv5 = self.inter_conv5(concat5)
flow5 = self.predict_flow5(out_interconv5)
flow5_up = self.upsampled_flow5_to_4(flow5)
out_deconv4 = self.deconv4(concat5)
concat4 = torch.cat((out_conv4,out_deconv4,flow5_up),1)
out_interconv4 = self.inter_conv4(concat4)
flow4 = self.predict_flow4(out_interconv4)
flow4_up = self.upsampled_flow4_to_3(flow4)
out_deconv3 = self.deconv3(concat4)
concat3 = torch.cat((out_conv3,out_deconv3,flow4_up),1)
out_interconv3 = self.inter_conv3(concat3)
flow3 = self.predict_flow3(out_interconv3)
flow3_up = self.upsampled_flow3_to_2(flow3)
out_deconv2 = self.deconv2(concat3)
concat2 = torch.cat((out_conv2,out_deconv2,flow3_up),1)
out_interconv2 = self.inter_conv2(concat2)
flow2 = self.predict_flow2(out_interconv2)
if self.training:
return flow2,flow3,flow4,flow5,flow6
else:
return self.upsample1(flow2*self.div_flow)
class FlowNet2CS(nn.Module):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: NVIDIA/flownet2-pytorch
Commit Name: e87597e058df8aedf24bcd3a1cfe537c44c1d713
Time: 2017-12-27
Author: freda@dhcp-172-20-232-236.nvidia.com
File Name: models.py
Class Name: FlowNet2SD
Method Name: forward
Project Name: NVIDIA/flownet2-pytorch
Commit Name: e87597e058df8aedf24bcd3a1cfe537c44c1d713
Time: 2017-12-27
Author: freda@dhcp-172-20-232-236.nvidia.com
File Name: models.py
Class Name: FlowNet2S
Method Name: forward
Project Name: gpleiss/efficient_densenet_pytorch
Commit Name: 445b161071b06cc493c6418892219d64ae3b84f0
Time: 2018-04-26
Author: gpleiss@gmail.com
File Name: models/densenet.py
Class Name: _DenseLayer
Method Name: forward
Project Name: facebookresearch/pytext
Commit Name: 66584dea87782aed5509e4269a9f015002e1f5c1
Time: 2021-02-23
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: PyTextEmbeddingModule
Method Name: forward