def __init__(self, obs_shape, action_shape, lr):
    super(CriticModel, self).__init__()
    assert (len(obs_shape) == 1), 'This network only works on flat observations'
    self.obs_shape = obs_shape
    self.action_shape = action_shape
    self.net = torch.nn.Sequential(torch.nn.Linear((obs_shape[0] + action_shape[0]), 512), torch.nn.ReLU(), torch.nn.Linear(512, 1))
    self.opt = optim.Adam(self.net.parameters(), lr=lr)
    if torch.cuda.is_available():
        print('Using CUDA')
    self.device = torch.device(('cuda:0' if torch.cuda.is_available() else 'cuda:1'))
    self.to(self.device)
def __init__(self, obs_shape, action_shape, lr):
    super(CriticModel, self).__init__()
    assert (len(obs_shape) == 1), 'This network only works on flat observations'
    self.obs_shape = obs_shape
    self.action_shape = action_shape
    self.net = torch.nn.Sequential(torch.nn.Linear((obs_shape[0] + action_shape[0]), 512), torch.nn.ReLU(), torch.nn.Linear(512, 1))
    self.opt = optim.Adam(self.net.parameters(), lr=lr)
    if torch.cuda.is_available():
        print('Using CUDA')
    self.device = torch.device(('cuda:0' if torch.cuda.is_available() else 'cuda:1'))
    self.to(self.device)