Exemple #1
0
 def __init__(self, n_inputs, n_hidden=500, classification=False):
     super(Architecture, self).__init__()
     self.fc1 = nn.Linear(n_inputs, n_hidden)
     self.fc2 = nn.Linear(n_hidden, n_hidden)
     self.fc3 = nn.Linear(n_hidden, 1)
     self.sigma_layer = AppendLayer(noise=1e-3)
     self.classification = classification
Exemple #2
0
 def __init__(self, n_inputs, n_tasks, emb_dim=5, n_hidden=50):
     super(Architecture, self).__init__()
     self.fc1 = torch.nn.Linear(n_inputs - 1 + emb_dim, n_hidden)
     self.fc2 = torch.nn.Linear(n_hidden, n_hidden)
     self.fc3 = torch.nn.Linear(n_hidden, 1)
     self.log_std = AppendLayer(noise=1e-3)
     self.emb = torch.nn.Embedding(n_tasks, emb_dim)
     self.n_tasks = n_tasks
Exemple #3
0
 def __init__(self, n_inputs, n_hidden=50):
     super(Architecture, self).__init__()
     self.fc1 = nn.Linear(n_inputs - 1, n_hidden)
     self.fc2 = nn.Linear(n_hidden, n_hidden)
     self.fc3 = nn.Linear(n_hidden, n_hidden)
     self.theta_layer = nn.Linear(n_hidden, 9)
     self.weight_layer = nn.Linear(n_hidden, 3)
     self.asymptotic_layer = nn.Linear(n_hidden, 1)
     self.sigma_layer = AppendLayer(noise=1e-3)
Exemple #4
0
 def __init__(self, n_inputs, n_hidden=50):
     super(Architecture, self).__init__()
     self.fc1 = torch.nn.Linear(n_inputs, n_hidden)
     self.fc2 = torch.nn.Linear(n_hidden, n_hidden)
     self.fc3 = torch.nn.Linear(n_hidden, 1)
     self.log_std = AppendLayer(noise=1e-3)
Exemple #5
0
 def __init__(self, n_inputs, n_hidden=100):
     super(Architecture, self).__init__()
     self.fc1 = nn.Linear(n_inputs, n_hidden)
     self.fc2 = nn.Linear(n_hidden, 2)
     self.sigma_layer = AppendLayer(noise=1e-3)