Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Avik Basu <[email protected]>
  • Loading branch information
ab93 committed Jun 12, 2024
1 parent 4b84bf2 commit b06c340
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Binary file removed examples/raw_pivoted.csv2.gz
Binary file not shown.
17 changes: 16 additions & 1 deletion numalogic/tools/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ def forward(self, input_: Tensor) -> Tensor:


class MultiChannelLinear(nn.Module):
"""
Linear layer that treats each feature as independent isolated channels.
Args:
----
in_features: num of input features
out_features: num of output features
n_channels: num of channels
device: device to run on
dtype: datatype to use
"""

def __init__(
self, in_features: int, out_features: int, n_channels: int, device=None, dtype=None
):
Expand Down Expand Up @@ -92,4 +104,7 @@ def forward(self, x):
return torch.swapdims(output, 0, 1)

def extra_repr(self) -> str:
return f"in_features={self.in_features}, out_features={self.out_features}, n_channels={self.n_channels}"
return (

Check warning on line 107 in numalogic/tools/layer.py

View check run for this annotation

Codecov / codecov/patch

numalogic/tools/layer.py#L107

Added line #L107 was not covered by tests
f"in_features={self.in_features}, out_features={self.out_features}, "
f"n_channels={self.n_channels}"
)

0 comments on commit b06c340

Please sign in to comment.