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
7197414
..
496a603
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, grid
",
+ help="byheart, learnop, guessop,
mixing, twotargets, addition, picoclvr, mnist, maze, snake, stack, expr, rpl, grid, qmlp
",
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
@@
-160,9
+160,9
@@
parser.add_argument("--expr_result_max", type=int, default=99)
parser.add_argument("--expr_input_file", type=str, default=None)
##############################
parser.add_argument("--expr_input_file", type=str, default=None)
##############################
-#
World options
+#
Misc
-parser.add_argument("--
world_vqae_nb_epochs", type=int, default=25
)
+parser.add_argument("--
mixing_hard", action="store_true", default=False
)
######################################################################
######################################################################
@@
-200,6
+200,12
@@
default_task_args = {
"nb_train_samples": 250000,
"nb_test_samples": 10000,
},
"nb_train_samples": 250000,
"nb_test_samples": 10000,
},
+ "qmlp": {
+ "model": "37M",
+ "batch_size": 10,
+ "nb_train_samples": 100000,
+ "nb_test_samples": 1000,
+ },
"guessop": {
"model": "352M",
"batch_size": 25,
"guessop": {
"model": "352M",
"batch_size": 25,
@@
-248,19
+254,18
@@
default_task_args = {
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
"nb_train_samples": 50000,
"nb_test_samples": 10000,
},
-
+ "mixing": {
+ "model": "37M",
+ "batch_size": 25,
+ "nb_train_samples": 250000,
+ "nb_test_samples": 10000,
+ },
"mnist": {
"model": "37M",
"batch_size": 10,
"nb_train_samples": 60000,
"nb_test_samples": 10000,
},
"mnist": {
"model": "37M",
"batch_size": 10,
"nb_train_samples": 60000,
"nb_test_samples": 10000,
},
- "world": {
- "model": "37M",
- "batch_size": 25,
- "nb_train_samples": 25000,
- "nb_test_samples": 1000,
- },
}
if args.task in default_task_args:
}
if args.task in default_task_args:
@@
-409,6
+414,16
@@
elif args.task == "twotargets":
device=device,
)
device=device,
)
+elif args.task == "mixing":
+ task = tasks.SandBox(
+ problem=problems.ProblemMixing(hard=args.mixing_hard),
+ nb_train_samples=args.nb_train_samples,
+ nb_test_samples=args.nb_test_samples,
+ batch_size=args.batch_size,
+ logger=log_string,
+ device=device,
+ )
+
elif args.task == "addition":
task = tasks.SandBox(
problem=problems.ProblemAddition(),
elif args.task == "addition":
task = tasks.SandBox(
problem=problems.ProblemAddition(),
@@
-514,12
+529,12
@@
elif args.task == "grid":
device=device,
)
device=device,
)
-elif args.task == "
world
":
- task = tasks.
World
(
+elif args.task == "
qmlp
":
+ task = tasks.
QMLP
(
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
batch_size=args.batch_size,
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
batch_size=args.batch_size,
-
vqae_nb_epochs=args.world_vqae_nb_epochs
,
+
result_dir=args.result_dir
,
logger=log_string,
device=device,
)
logger=log_string,
device=device,
)