bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
ppo_cartpole::ActorImpl Struct Reference
Inheritance diagram for ppo_cartpole::ActorImpl:
Collaboration diagram for ppo_cartpole::ActorImpl:

Public Member Functions

 ActorImpl ()
torch_tensor_t forward (torch_tensor_t states)
std::tuple< uint_t, torch_tensor_t > act (const std::vector< real_t > &state)
std::tuple< torch_tensor_t, torch_tensor_t, torch_tensor_t > evaluate (torch_tensor_t states, torch_tensor_t actions)
uint_t greedy (const std::vector< real_t > &state)

Public Attributes

torch::nn::Linear fc1
torch::nn::Linear fc2
torch::nn::Linear logits

Constructor & Destructor Documentation

◆ ActorImpl()

ppo_cartpole::ActorImpl::ActorImpl ( )
inline

Member Function Documentation

◆ act()

std::tuple< uint_t, torch_tensor_t > ppo_cartpole::ActorImpl::act ( const std::vector< real_t > & state)
inline

◆ evaluate()

std::tuple< torch_tensor_t, torch_tensor_t, torch_tensor_t > ppo_cartpole::ActorImpl::evaluate ( torch_tensor_t states,
torch_tensor_t actions )
inline

◆ forward()

torch_tensor_t ppo_cartpole::ActorImpl::forward ( torch_tensor_t states)
inline

◆ greedy()

uint_t ppo_cartpole::ActorImpl::greedy ( const std::vector< real_t > & state)
inline

Member Data Documentation

◆ fc1

torch::nn::Linear ppo_cartpole::ActorImpl::fc1

◆ fc2

torch::nn::Linear ppo_cartpole::ActorImpl::fc2

◆ logits

torch::nn::Linear ppo_cartpole::ActorImpl::logits

The documentation for this struct was generated from the following file: