You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
convert_to_analog drops a repeated layer from nn.Sequential #825
Converting nn.Sequential(layer, layer) removes the second application of the shared layer. With FloatingPointRPUConfig, the converted model returns 0.25 instead of 0.0625.
aihwkit 1.2.0 at b5aeea78859a4a028975519e154088d3ae0efeaf, PyTorch 2.5.1+cpu, Python 3.12.3, NumPy 2.5.4, Linux x86_64, GCC 13.3.0, OpenBLAS 0.3.28, native CPU Release build, CUDA off, Conda N/A.
How to reproduce
Using a CPU source build of that commit, save this as sequential_repro.py.
The conversion contract promises replacement of all Conv/Linear layers. Both applications should remain and yield (1/4)*(1/4)*1 = 1/16, following the ideal tile equation. The conversion docs are silent about repeated layer registrations.
Other information
The container conversion rebuilds the sequence from named_children(), which omits duplicate module objects. We tested CPU float32 with both inplace settings and passing distinct-layer controls, but did not test CUDA or convolution reuse.
Activity