bc601d05003fe26dfe1a14bb8a3ec61757444ae1,batchflow/models/eager_torch/layers/resize.py,ReduceDim,forward,#ReduceDim#Any#,28
Before Change
self.dim = dim
def forward(self, x):
dim = max(len(get_shape(x)) - 2 - self.dim, 0)
ones = [1] * dim
return x.view(x.size(0), -1, *ones)
After Change
self.dim = dim
def forward(self, x):
dim = max(get_num_dims(x) - self.dim, 0)
ones = [1] * dim
return x.view(x.size(0), -1, *ones)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: analysiscenter/batchflow
Commit Name: bc601d05003fe26dfe1a14bb8a3ec61757444ae1
Time: 2019-12-05
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/eager_torch/layers/resize.py
Class Name: ReduceDim
Method Name: forward
Project Name: analysiscenter/batchflow
Commit Name: bc601d05003fe26dfe1a14bb8a3ec61757444ae1
Time: 2019-12-05
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/eager_torch/layers/resize.py
Class Name: Combine
Method Name: spatial_resize
Project Name: analysiscenter/batchflow
Commit Name: bc601d05003fe26dfe1a14bb8a3ec61757444ae1
Time: 2019-12-05
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/eager_torch/layers/resize.py
Class Name: IncreaseDim
Method Name: forward