Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <torch/torch.h>
- #include <ATen/Context.h>
- #include <iostream>
- torch::Tensor ActivationFunction(const torch::Tensor &x)
- {
- // Sigmoid function.
- auto retVal = 1/(1+torch::exp(-x));
- return retVal;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement