1 #include <torch/nn/modules/functional.h> 3 #include <torch/types.h> 10 FunctionalImpl::FunctionalImpl(Function
function)
11 : function_(
std::move(function)) {}
13 void FunctionalImpl::reset() {}
15 void FunctionalImpl::pretty_print(std::ostream& stream)
const {
16 stream <<
"torch::nn::Functional()";
20 return function_(std::move(input));
24 return forward(std::move(input));
Tensor forward(const Tensor &indices)
Performs a lookup on the embedding table stored in weight using the indices supplied and returns the ...