Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bauerfe committed Nov 12, 2024
1 parent c0291e1 commit a794647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions sinabs/backend/dynapcnn/dynapcnn_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,16 +766,12 @@ class DynapcnnCompatibleNetwork(DynapcnnNetwork):
"""Deprecated class, use DynapcnnNetwork instead."""

def __init__(
self,
snn: Union[nn.Sequential, sinabs.Network],
input_shape: Optional[Tuple[int, int, int]] = None,
dvs_input: bool = False,
discretize: bool = True,
self, *args, **kwargs
):
from warnings import warn

warn(
"DynapcnnCompatibleNetwork has been renamed to DynapcnnNetwork "
+ "and will be removed in a future release."
)
super().__init__(snn, input_shape, dvs_input, discretize)
super().__init__(*args, **kwargs)
4 changes: 2 additions & 2 deletions tests/test_dynapcnn/test_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def get_demo_dynapcnn_network():
import torch.nn as nn

import sinabs
from sinabs.backend.dynapcnn import DynapcnnCompatibleNetwork
from sinabs.backend.dynapcnn import DynapcnnNetwork

ann = nn.Sequential(nn.Conv2d(2, 8, (3, 3)), nn.ReLU(), nn.AvgPool2d((2, 2)))
snn = sinabs.from_model(ann, input_shape=(2, 64, 64), batch_size=1)

dynapcnn_network = DynapcnnCompatibleNetwork(
dynapcnn_network = DynapcnnNetwork(
snn=snn, input_shape=(2, 64, 64), dvs_input=True
)
return dynapcnn_network
Expand Down

0 comments on commit a794647

Please sign in to comment.