projects
/
culture.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[culture.git]
/
main.py
diff --git
a/main.py
b/main.py
index
7b104bf
..
704dff5
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-33,7
+33,7
@@
parser.add_argument(
"--task",
type=str,
default="twotargets",
"--task",
type=str,
default="twotargets",
- help="byheart, learnop, guessop, twotargets, addition, picoclvr, mnist, maze, snake, stack, expr, rpl",
+ help="byheart, learnop, guessop, twotargets, addition, picoclvr, mnist, maze, snake, stack, expr, rpl
, grid
",
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
@@
-62,7
+62,7
@@
parser.add_argument("--learning_rate_schedule", type=str, default="10: 2e-5,30:
########################################
########################################
-parser.add_argument("--model", type=str, default=
"37M"
)
+parser.add_argument("--model", type=str, default=
None
)
parser.add_argument("--dim_model", type=int, default=None)
parser.add_argument("--dim_model", type=int, default=None)
@@
-89,16
+89,21
@@
parser.add_argument("--checkpoint_name", type=str, default="checkpoint.pth")
##############################
# rpl options
##############################
# rpl options
-parser.add_argument("--rpl_nb_starting_values", type=int, default=
5
)
+parser.add_argument("--rpl_nb_starting_values", type=int, default=
3
)
parser.add_argument("--rpl_max_input", type=int, default=9)
parser.add_argument("--rpl_max_input", type=int, default=9)
-parser.add_argument("--rpl_prog_len", type=int, default=
10
)
+parser.add_argument("--rpl_prog_len", type=int, default=
8
)
-parser.add_argument("--rpl_nb_runs", type=int, default=
8
)
+parser.add_argument("--rpl_nb_runs", type=int, default=
5
)
parser.add_argument("--rpl_no_prog", action="store_true", default=False)
parser.add_argument("--rpl_no_prog", action="store_true", default=False)
+##############################
+# grid options
+
+parser.add_argument("--grid_size", type=int, default=6)
+
##############################
# picoclvr options
##############################
# picoclvr options
@@
-113,11
+118,11
@@
parser.add_argument("--picocvlr_prune_properties", type=str, default="none")
##############################
# Maze options
##############################
# Maze options
-parser.add_argument("--maze_height", type=int, default=
2
3)
+parser.add_argument("--maze_height", type=int, default=
1
3)
-parser.add_argument("--maze_width", type=int, default=
39
)
+parser.add_argument("--maze_width", type=int, default=
21
)
-parser.add_argument("--maze_nb_walls", type=int, default=
4
5)
+parser.add_argument("--maze_nb_walls", type=int, default=
1
5)
##############################
# Snake options
##############################
# Snake options
@@
-172,83
+177,103
@@
if args.result_dir is None:
default_task_args = {
"byheart": {
default_task_args = {
"byheart": {
- "nb_epochs": 5,
+ "model": "37M",
+ "nb_epochs": 2,
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"learnop": {
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"learnop": {
- "nb_epochs": 5,
+ "model": "37M",
+ "nb_epochs": 15,
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"guessop": {
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"guessop": {
+ "model": "352M",
"nb_epochs": 5,
"batch_size": 25,
"nb_epochs": 5,
"batch_size": 25,
- "nb_train_samples":
5
0000,
+ "nb_train_samples":
100
0000,
"nb_test_samples": 10000,
},
"twotargets": {
"nb_test_samples": 10000,
},
"twotargets": {
- "nb_epochs": 5,
+ "model": "37M",
+ "nb_epochs": 10,
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"addition": {
"batch_size": 25,
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"addition": {
- "nb_epochs": 5,
+ "model": "352M",
+ "nb_epochs": 50,
"batch_size": 25,
"batch_size": 25,
- "nb_train_samples": 50000,
+ "nb_train_samples":
2
50000,
"nb_test_samples": 10000,
},
"picoclvr": {
"nb_test_samples": 10000,
},
"picoclvr": {
+ "model": "37M",
"nb_epochs": 25,
"batch_size": 25,
"nb_train_samples": 250000,
"nb_test_samples": 10000,
},
"mnist": {
"nb_epochs": 25,
"batch_size": 25,
"nb_train_samples": 250000,
"nb_test_samples": 10000,
},
"mnist": {
+ "model": "37M",
"nb_epochs": 25,
"batch_size": 10,
"nb_train_samples": 60000,
"nb_test_samples": 10000,
},
"maze": {
"nb_epochs": 25,
"batch_size": 10,
"nb_train_samples": 60000,
"nb_test_samples": 10000,
},
"maze": {
+ "model": "37M",
"nb_epochs": 25,
"batch_size": 5,
"nb_epochs": 25,
"batch_size": 5,
- "nb_train_samples":
25
0000,
+ "nb_train_samples":
10
0000,
"nb_test_samples": 10000,
},
"snake": {
"nb_test_samples": 10000,
},
"snake": {
+ "model": "37M",
"nb_epochs": 5,
"batch_size": 25,
"nb_epochs": 5,
"batch_size": 25,
- "nb_train_samples": 50000,
+ "nb_train_samples":
2
50000,
"nb_test_samples": 10000,
},
"stack": {
"nb_test_samples": 10000,
},
"stack": {
- "nb_epochs": 5,
+ "model": "37M",
+ "nb_epochs": 15,
"batch_size": 25,
"nb_train_samples": 100000,
"nb_test_samples": 1000,
},
"expr": {
"batch_size": 25,
"nb_train_samples": 100000,
"nb_test_samples": 1000,
},
"expr": {
- "nb_epochs": 40,
+ "model": "352M",
+ "nb_epochs": 25,
"batch_size": 25,
"batch_size": 25,
- "nb_train_samples":
10
00000,
+ "nb_train_samples":
25
00000,
"nb_test_samples": 10000,
},
"rpl": {
"nb_test_samples": 10000,
},
"rpl": {
- "nb_epochs": 40,
- "batch_size": 25,
- "nb_train_samples": 100000,
+ "model": "122M",
+ "nb_epochs": 50,
+ "batch_size": 5,
+ "nb_train_samples": 1000000,
"nb_test_samples": 10000,
},
"world": {
"nb_test_samples": 10000,
},
"world": {
+ "model": "37M",
"nb_epochs": 10,
"batch_size": 25,
"nb_train_samples": 25000,
"nb_test_samples": 1000,
},
"nb_epochs": 10,
"batch_size": 25,
"nb_train_samples": 25000,
"nb_test_samples": 1000,
},
+ "grid": {
+ "model": "37M",
+ "nb_epochs": 25,
+ "batch_size": 25,
+ "nb_train_samples": 250000,
+ "nb_test_samples": 10000,
+ },
}
if args.task in default_task_args:
}
if args.task in default_task_args:
@@
-492,6
+517,16
@@
elif args.task == "rpl":
device=device,
)
device=device,
)
+elif args.task == "grid":
+ task = tasks.Grid(
+ nb_train_samples=args.nb_train_samples,
+ nb_test_samples=args.nb_test_samples,
+ batch_size=args.batch_size,
+ size=args.grid_size,
+ logger=log_string,
+ device=device,
+ )
+
elif args.task == "world":
task = tasks.World(
nb_train_samples=args.nb_train_samples,
elif args.task == "world":
task = tasks.World(
nb_train_samples=args.nb_train_samples,