-
Franck Dary authoredFranck Dary authored
StateNameModule.hpp 675 B
#ifndef STATENAMEMODULE__H
#define STATENAMEMODULE__H
#include <torch/torch.h>
#include "Submodule.hpp"
#include "MyModule.hpp"
#include "LSTM.hpp"
#include "GRU.hpp"
class StateNameModuleImpl : public Submodule
{
private :
torch::nn::Embedding embeddings{nullptr};
int outSize;
public :
StateNameModuleImpl(std::string name, const std::string & definition);
torch::Tensor forward(torch::Tensor input);
std::size_t getOutputSize() override;
std::size_t getInputSize() override;
void addToContext(std::vector<std::vector<long>> & context, const Config & config) override;
void registerEmbeddings() override;
};
TORCH_MODULE(StateNameModule);
#endif