예제 #1
0
파일: base.py 프로젝트: amackeith/dl
 def build(self):
     """Build."""
     self.fc1 = nn.Linear(self.observation_space.shape[0], 32)
     self.fc2 = nn.Linear(32, 32)
     self.fc3 = nn.Linear(32, 32)
     if isinstance(self.action_space, gym.spaces.Box):
         self.dist = TanhDiagGaussian(32, self.action_space.shape[0])
     else:
         self.dist = Categorical(32, self.action_space.n)
예제 #2
0
 def build(self):
     """Build Network."""
     self.fc1 = nn.Linear(self.observation_space.shape[0], 32)
     self.fc2 = nn.Linear(32, 32)
     self.fc3 = nn.Linear(32, 32)
     self.dist = TanhDiagGaussian(32, self.action_space.shape[0])
예제 #3
0
 def __init__(self, n_in, n_out_torque, n_out_position, **kwargs):
     super().__init__()
     self.torque_dist = TanhDiagGaussian(n_in, n_out_torque, **kwargs)
     self.position_dist = TanhDiagGaussian(n_in, n_out_position, **kwargs)