3 This is an implementation of a simple 2d physics simulator usable from
9 torch.ByteTensor generate_sequence(bool pulling,
12 int image_height, int image_width,
14 bool random_shape_size, bool random_colors)
19 * `pulling` indicates if one of the shape should be pulled upward,
20 * `nb_sequences` is the number of sequences to generate,
21 * `nb_images` is the number of frames per sequence,
22 * `image_height` and `image_width` is the individual image size,
23 * `nb_shapes` is the number of rectangular shapes in the simulation,
24 * `random_shape_size` states if the shapes should be of different sizes,
25 * `random_colors` states if they should be of different colors.
27 The returned ByteTensor has five dimensions:
31 * Channel (3 since it is RGB)
35 Warning: For improper parameters values (e.g. too many shapes, too
36 small images), the simulation may be stuck.
38 # Installation and test #