Fix things codacy complains about

This commit is contained in:
Jensun Ravichandran 2020-09-24 11:53:35 +02:00
parent 9672aab8e2
commit 58efa5a4cf
3 changed files with 6 additions and 7 deletions

View File

@ -1,6 +1,8 @@
# To validate the contents of your configuration file # To validate the contents of your configuration file
# run the following command in the folder where the configuration file is located: # run the following command in the folder where the configuration file is located:
# codacy-analysis-cli validate-configuration --directory `pwd` # codacy-analysis-cli validate-configuration --directory `pwd`
# To analyse, run:
# codacy-analysis-cli analyse --tool remark-lint --directory `pwd`
--- ---
engines: engines:
pylintpython3: pylintpython3:
@ -10,4 +12,4 @@ engines:
exclude_paths: exclude_paths:
- config/engines.yml - config/engines.yml
exclude_paths: exclude_paths:
- '**/tests/**' - 'tests/**'

View File

@ -2,11 +2,8 @@
import warnings import warnings
import numpy as np
import torch import torch
from prototorch.functions.competitions import wtac
from prototorch.functions.distances import sed
from prototorch.functions.initializers import get_initializer from prototorch.functions.initializers import get_initializer
@ -55,7 +52,7 @@ class Prototypes1D(_Prototypes):
:math:`(\text{total_prototypes}, \text{prototype_dimension})`. :math:`(\text{total_prototypes}, \text{prototype_dimension})`.
prototype_labels: the non-learnable labels of the prototypes. prototype_labels: the non-learnable labels of the prototypes.
Examples:: Examples:
>>> p = Prototypes1D(input_dim=20, nclasses=10) >>> p = Prototypes1D(input_dim=20, nclasses=10)
>>> input = torch.randn(128, 20) >>> input = torch.randn(128, 20)