nn_negative <- torch::nn_module(
classname = "nn_negative",
# --- init
initialize = function(...){
# -- empty
},
# --- forward
forward = function(x,...) {
return( -x )
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.