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
80f2733
..
58e8046
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-35,7
+35,7
@@
parser.add_argument(
"--task",
type=str,
default="picoclvr",
"--task",
type=str,
default="picoclvr",
- help="picoclvr, mnist, maze, snake, stack, expr",
+ help="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=" ")
@@
-110,7
+110,7
@@
parser.add_argument("--snake_nb_colors", type=int, default=5)
parser.add_argument("--snake_length", type=int, default=200)
##############################
parser.add_argument("--snake_length", type=int, default=200)
##############################
-# S
nake
options
+# S
tack
options
parser.add_argument("--stack_nb_steps", type=int, default=100)
parser.add_argument("--stack_nb_steps", type=int, default=100)
@@
-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=10)
+
######################################################################
args = parser.parse_args()
######################################################################
args = parser.parse_args()
@@
-181,6
+186,12
@@
default_args = {
"nb_train_samples": 1000000,
"nb_test_samples": 10000,
},
"nb_train_samples": 1000000,
"nb_test_samples": 10000,
},
+ "world": {
+ "nb_epochs": 5,
+ "batch_size": 25,
+ "nb_train_samples": 10000,
+ "nb_test_samples": 1000,
+ },
}
if args.task in default_args:
}
if args.task in default_args:
@@
-317,6
+328,15
@@
elif args.task == "expr":
device=device,
)
device=device,
)
+elif args.task == "world":
+ task = tasks.World(
+ 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,
+ device=device,
+ )
+
else:
raise ValueError(f"Unknown task {args.task}")
else:
raise ValueError(f"Unknown task {args.task}")