diff --git a/prototorch/datasets/abstract.py b/prototorch/datasets/abstract.py index 7817bb8..f38110b 100644 --- a/prototorch/datasets/abstract.py +++ b/prototorch/datasets/abstract.py @@ -1,4 +1,4 @@ -"""ProtoTorch abstract datasets +"""ProtoTorch abstract dataset classes. Based on `torchvision.VisionDataset` and `torchvision.MNIST` @@ -13,7 +13,7 @@ import torch class Dataset(torch.utils.data.Dataset): - """Abstract dataset class to be inherited""" + """Abstract dataset class to be inherited.""" _repr_indent = 2 def __init__(self, root): @@ -29,7 +29,7 @@ class Dataset(torch.utils.data.Dataset): class ProtoDataset(Dataset): - """Abstract dataset class to be inherited""" + """Abstract dataset class to be inherited.""" training_file = 'training.pt' test_file = 'test.pt' diff --git a/prototorch/functions/activations.py b/prototorch/functions/activations.py index 1ed141e..f394bc0 100644 --- a/prototorch/functions/activations.py +++ b/prototorch/functions/activations.py @@ -16,7 +16,7 @@ def register_activation(function): @register_activation # @torch.jit.script -def identity(x, beta=torch.tensor([0])): +def identity(x, beta=torch.tensor(0)): """Identity activation function. Definition: @@ -27,7 +27,7 @@ def identity(x, beta=torch.tensor([0])): @register_activation # @torch.jit.script -def sigmoid_beta(x, beta=torch.tensor([10])): +def sigmoid_beta(x, beta=torch.tensor(10)): r"""Sigmoid activation function with scaling. Definition: @@ -42,7 +42,7 @@ def sigmoid_beta(x, beta=torch.tensor([10])): @register_activation # @torch.jit.script -def swish_beta(x, beta=torch.tensor([10])): +def swish_beta(x, beta=torch.tensor(10)): r"""Swish activation function with scaling. Definition: