rstudio / tensorflow.rstudio.com

https://tensorflow.rstudio.com
9 stars 12 forks source link

Creating named python function #7

Open dfalbel opened 2 years ago

dfalbel commented 2 years ago

To allow serialization of custom functions/activations. See eg:

https://github.com/t-kalinowski/tf-site/blob/e4234035fe816d66ba79a993bfcd9265683d2ffb/guides/keras/serialization_and_saving.qmd#L489-L505

versus

https://github.com/t-kalinowski/tf-site/blob/e4234035fe816d66ba79a993bfcd9265683d2ffb/guides/keras/serialization_and_saving.py#L524-L536

dfalbel commented 2 years ago

We will PR for layer_activation so it uses substitute to generate a function name based on the R function name that has been passed.