Coverage Control Library
|
Controller class for neural network based controllers. More...
Public Member Functions | |
__init__ (self, dict config, Parameters params, CoverageSystem env) | |
Constructor for the neural network controller. | |
step (self, env) | |
step function for the neural network controller | |
Public Attributes | |
config = config | |
params = params | |
name = self.config["Name"] | |
use_cnn = self.config["UseCNN"] | |
use_comm_map = self.config["UseCommMap"] | |
cnn_map_size = self.config["CNNMapSize"] | |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
model_file = IOUtils.sanitize_path(self.config["ModelFile"]) | |
model = torch.load(self.model_file).to(self.device) | |
learning_params_file | |
learning_params = IOUtils.load_toml(self.learning_params_file) | |
actions_mean = self.model.actions_mean.to(self.device) | |
actions_std = self.model.actions_std.to(self.device) | |
Controller class for neural network based controllers.
Definition at line 94 of file controllers.py.
__init__ | ( | self, | |
dict | config, | ||
Parameters | params, | ||
CoverageSystem | env ) |
Constructor for the neural network controller.
config | Configuration dictionary |
params | Parameters object |
env | CoverageSystem object |
Definition at line 103 of file controllers.py.
step | ( | self, | |
env ) |
step function for the neural network controller
Performs three steps: 1. Get the data from the environment 2. Get the actions from the model 3. Step the environment using the actions
env | CoverageSystem object |
Definition at line 143 of file controllers.py.
actions_mean = self.model.actions_mean.to(self.device) |
Definition at line 125 of file controllers.py.
actions_std = self.model.actions_std.to(self.device) |
Definition at line 126 of file controllers.py.
cnn_map_size = self.config["CNNMapSize"] |
Definition at line 109 of file controllers.py.
config = config |
Definition at line 104 of file controllers.py.
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") |
Definition at line 111 of file controllers.py.
learning_params = IOUtils.load_toml(self.learning_params_file) |
Definition at line 121 of file controllers.py.
learning_params_file |
Definition at line 118 of file controllers.py.
model = torch.load(self.model_file).to(self.device) |
Definition at line 116 of file controllers.py.
model_file = IOUtils.sanitize_path(self.config["ModelFile"]) |
Definition at line 115 of file controllers.py.
name = self.config["Name"] |
Definition at line 106 of file controllers.py.
params = params |
Definition at line 105 of file controllers.py.
use_cnn = self.config["UseCNN"] |
Definition at line 107 of file controllers.py.
use_comm_map = self.config["UseCommMap"] |
Definition at line 108 of file controllers.py.