somap is stored as a plain tensor in SOM.__init__ rather than being registered via register_buffer() or as an nn.Parameter. The same applies to coord.
This means:
model.to(device) won't move somap/coord automatically (the manual .to() override works around this but is fragile)
model.state_dict() won't include somap, so saving/loading a trained model loses the trained map
model.load_state_dict() can't restore the map
Suggested fix
Use self.register_buffer('somap', ...) for somap and self.register_buffer('coord', ...) for coord. This would also allow removing the manual .to() overrides in SOM, WSOM, and MCWSOM.