fff-rs / juice

The Hacker's Machine Learning Engine
1.1k stars 77 forks source link

Remove associated type for ConvolutionConfig #167

Closed hweom closed 1 year ago

hweom commented 1 year ago

What does this PR accomplish?

Get rid of an associated type for ConvolutionConfig for NN plugin.

This is a first step for completely eliminating associated types from IBackend trait such that it can be passed as &dyn reference to layer trait (which in turn means that it won't need to be generic).

Changes proposed by this PR:

Makes the ConvolutionConfig a trait object, which is then internally downcasted to native structs by implementations.

Notes to reviewer:

ui tests fail, but so they do in the current arch-refactor branch.

example-mnist-classification mnist conv works (achieves 95% accuracy).

📜 Checklist