fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.18k stars 388 forks source link

Remove obsolete parameter mapping between pytorch and keras #847

Closed JanFSchulte closed 11 months ago

JanFSchulte commented 11 months ago

The pytorch parser still uses a mapping between tensor names from keras to pytorch which has become obsolete. In its current form, it breaks BatchNorm layers. This PR simply removes this functionality, restoring BatchNorm functionality and removing clutter. A test for BatchNorm in pytorch is added to prevent further breaking of this functionality

Type of change

For a new feature or function, please create an issue first to discuss it with us before submitting a pull request.

Note: Please delete options that are not relevant.

Tests

Ran pytests to verify that nothing gets broken, verified that BatchNorm layers parse successfully after the fix.

Checklist