f29fe9adc0cfd99ae0689f548d13f9822baae39f,kornia/losses/focal.py,,focal_loss,#Any#Any#Any#Any#Any#Any#,13
Before Change
.format(type(input)))
if not len(input.shape) == 4:
raise ValueError("Invalid input shape, we expect BxNxHxW. Got: {}"
.format(input.shape))
if not input.shape[-2:] == target.shape[-2:]:
raise ValueError("input and target shapes must be the same. Got: {}"
After Change
.format(input.shape))
if input.size(0) != target.size(0):
raise ValueError("Expected input batch_size ({}) to match target batch_size ({})."
.format(input.size(0), target.size(0)))
n = input.size(0)
out_size = (n,) + input.size()[2:]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: arraiy/torchgeometry
Commit Name: f29fe9adc0cfd99ae0689f548d13f9822baae39f
Time: 2020-01-08
Author: ducha.aiki@gmail.com
File Name: kornia/losses/focal.py
Class Name:
Method Name: focal_loss
Project Name: OpenNMT/OpenNMT-py
Commit Name: 77a6ec73c53c5cc62a2ae451694537144afa5644
Time: 2016-09-14
Author: alerer@fb.com
File Name: mnist/main.py
Class Name:
Method Name: test
Project Name: rusty1s/pytorch_geometric
Commit Name: dd9a4fdb10bbe81fbddce52710ba2761f64f7610
Time: 2020-05-23
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/node2vec.py
Class Name: Node2Vec
Method Name: __repr__