redefine 1D `self.N`, deprecate`self.J_pad`?
See original GitHub issuein 1D, self.N
is the unpadded length of the input signal. It is defined in ScatteringBase1D
as some derivative of self.shape
and isn’t being used anywhere else.
Same for 2D where self.shape
unpacks as self.M
, self.N
.
I see no reason to keep these values as attributes in the object when:
- we have
self.shape
for that - these values are only being used transiently, in
self.build()
- our filterbank construction relies on
N_padded
, notN
- these values are trivially available in the forward via
self.N = len(x)
In the spirit of preparing for scattering on variable-length inputs (shape=None
, a long-requested feature !), i ask the permission to remove these attributes from self
.
I am open to making a deprecation cycle where we convert these attributes to read-only properties and print a DeprecationWarning
in v0.3 if anyone tries to access these numbers (NB: none of our examples access self.N
and friends)
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Might be good to rename it to something like
_N_padded
, though to make clear it’s the padded size that’s intended.But why even keep the
N
attribute? The padded size is, in a sense, an internal parameter for the implementation. Why do we need to expose it to the user at all?