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
c763016
..
69ee58f
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-34,8
+34,8
@@
parser = argparse.ArgumentParser(
parser.add_argument(
"--task",
type=str,
parser.add_argument(
"--task",
type=str,
- default="
picoclvr
",
- help="picoclvr, mnist, maze, snake, stack, expr, world",
+ default="
sandbox
",
+ help="
sandbox,
picoclvr, mnist, maze, snake, stack, expr, world",
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
)
parser.add_argument("--log_filename", type=str, default="train.log", help=" ")
@@
-133,6
+133,11
@@
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
+
+parser.add_argument("--world_vqae_nb_epochs", type=int, default=25)
+
######################################################################
args = parser.parse_args()
######################################################################
args = parser.parse_args()
@@
-145,6
+150,12
@@
if args.result_dir is None:
######################################################################
default_args = {
######################################################################
default_args = {
+ "sandbox": {
+ "nb_epochs": 10,
+ "batch_size": 25,
+ "nb_train_samples": 25000,
+ "nb_test_samples": 10000,
+ },
"picoclvr": {
"nb_epochs": 25,
"batch_size": 25,
"picoclvr": {
"nb_epochs": 25,
"batch_size": 25,
@@
-182,9
+193,9
@@
default_args = {
"nb_test_samples": 10000,
},
"world": {
"nb_test_samples": 10000,
},
"world": {
- "nb_epochs":
5
,
+ "nb_epochs":
10
,
"batch_size": 25,
"batch_size": 25,
- "nb_train_samples":
10
000,
+ "nb_train_samples":
25
000,
"nb_test_samples": 1000,
},
}
"nb_test_samples": 1000,
},
}
@@
-252,7
+263,16
@@
picoclvr_pruner_eval = (
######################################################################
######################################################################
-if args.task == "picoclvr":
+if args.task == "sandbox":
+ task = tasks.SandBox(
+ 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 == "picoclvr":
task = tasks.PicoCLVR(
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
task = tasks.PicoCLVR(
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
@@
-328,6
+348,8
@@
elif args.task == "world":
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,
+ logger=log_string,
device=device,
)
device=device,
)