acfr / RobustNeuralNetworks.jl

A Julia package for robust neural networks.
https://acfr.github.io/RobustNeuralNetworks.jl/
MIT License
49 stars 2 forks source link

Attempt to improve package loading speeds #116

Closed nic-barbara closed 1 year ago

nic-barbara commented 1 year ago

As outlined in https://github.com/acfr/RobustNeuralNetworks.jl/issues/75, I tried removing Flux.jl as a dependency to improve package loading speeds. It speeds things up by about 30%, going from 2.4s to 1.7s in Julia v1.9.

Downside is that we have to re-implement a few common interface things from Flux.jl, like glorot_normal, and to remove Zygote.jl we'd have to re-implement the Buffer and it's adjoints with ChainRulesCore.jl. Not worth it for now.

I've left a note in src/RobustNeuralNetworks.jl on how to remove Flux.jl as a dependency if we want to do this in the future.