-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
48 lines (44 loc) · 1.01 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import torch
from models import *
from environments import *
train_size = None
K = 5
query_size = 5
data_generator = FunctionTaskGenerator(input_dim=1, transform=atan_transform).to(device)
input_dim = data_generator.input_dim
batch = 50
val_interval = 1000
val_trials = 50
val_samples = 20
itr = 0
learning_rate = 1e-3
model_name = 'Alpaca'
model = {
'VMGP': lambda: VariationalMetaGP(
input_dim=input_dim,
hidden_units=40,
latent_dim=10,
hidden_layers=2,
out_var=1e-2,
deep_kernel_dim=10,
),
'MGP': lambda: MetaGP(
input_dim=input_dim,
deep_kernel_dim=10,
hidden_units=40,
hidden_layers=2,
),
'EMAML': lambda: EMAML(
input_dim=input_dim,
hidden_units=40,
hidden_layers=2,
support_size=K,
query_size=query_size
),
'Alpaca': lambda: Alpaca(
input_dim=input_dim,
deep_kernel_dim=10,
hidden_units=40,
hidden_layers=2,
)
}[model_name]().to(device)