rstudio / keras3

R Interface to Keras
https://keras3.posit.co/
Other
838 stars 283 forks source link

Weight pruning in Keras for R #1150

Closed faltinl closed 3 years ago

faltinl commented 3 years ago

Weight pruning seems to be a valuable tool to improve neural networks' ability to generalize by throwing away those parts (weights) of the network which do not significantly contribute to convergence and accuracy. An introductory article can be found under Obtaining Top Neural Network Performance Without Any Training and references given therein.

Unfortunately I cannot find any useful tools among the help pages of my Keras 2.3.0.0. package in R. Are there any other helpful packages or ready-to-use workarounds somewhere else to apply the technique of weight pruning (structured or unstructured) within Keras for R?

Any helpful hints would be highly appreciated.

dfalbel commented 3 years ago

Currently there's no plan to port tensorflow_model_optimization to R.

In theory you could install the library with: reticulate::py_install("tensorflow-model-optimization", pip = TRUE) and then use it with tfmod <- reticulate::import("tensorflow_model_optimization").

faltinl commented 3 years ago

Currently there's no plan to port tensorflow_model_optimization to R.

Oh, what a pity!

In theory you could install the library with: reticulate::py_install("tensorflow-model-optimization", pip = TRUE) and then use it with tfmod <- reticulate::import("tensorflow_model_optimization").

Sounds quite challenging. Perhaps I shall try it... Thank you nevertheless, Daniel! Cheers, Leo