-
Notifications
You must be signed in to change notification settings - Fork 130
/
Copy pathdemo-fwd.config
60 lines (41 loc) · 1.15 KB
/
demo-fwd.config
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
49
50
51
52
53
54
55
56
57
58
59
60
#!returnn/rnn.py
#
# first train the network with
# ./rnn.py demos/demo-fwd.config --task=train
import os
import pwd
demo_name, _ = os.path.splitext(__file__)
print("Hello, experiment: %s" % demo_name)
task="forward"
use_tensorflow = True
# set the log_dir to None to disable logging.
# This is required currently as otherwise summary ops are generated.
tf_log_dir = None
seq_len = 5
n_data_dim = 2
n_classes_dim = 3
num_seqs = 20
forward_batch_size = 5
train = {"class": "DummyDataset",
"num_seqs": num_seqs*10,
"input_dim": n_data_dim,
"output_dim": n_classes_dim,
"seq_len": 5}
num_inputs = n_data_dim
num_outputs = n_classes_dim
dev = train.copy()
dev.update({"num_seqs": train["num_seqs"] // 10, "fixed_random_seed": 42})
eval = dev.copy()
#num_epochs = 1
#batching = "random"
#chunking = "200:200"
user = pwd.getpwuid(os.getuid())[0]
model = "/tmp/%s/returnn/%s/model" % (user, demo_name) # https://github.com/tensorflow/tensorflow/issues/6537
num_outputs = n_classes_dim
num_inputs = n_data_dim
network = {
'output': {'class': 'softmax', 'loss': 'ce'}
}
output_file = '/tmp/forwarded.hdf'
#log
log_verbosity = 3