GeneratingDataset

class GeneratingDataset.GeneratingDataset(input_dim, output_dim, num_seqs=inf, fixed_random_seed=None, **kwargs)[source]
Parameters:
  • input_dim (int) –
  • output_dim (int|dict[str,int|(int,int)|dict]) –
  • num_seqs (int|float) –
  • fixed_random_seed (int) –
init_seq_order(epoch=None, seq_list=None)[source]
Parameters:seq_list – predefined order. doesn’t make sense here

This is called when we start a new epoch, or at initialization.

is_cached(start, end)[source]
generate_seq(seq_idx)[source]
Return type:DatasetSeq
get_num_timesteps()[source]
num_seqs[source]
get_seq_length(sorted_seq_idx)[source]
get_input_data(sorted_seq_idx)[source]
get_targets(target, sorted_seq_idx)[source]
get_ctc_targets(sorted_seq_idx)[source]
get_tag(sorted_seq_idx)[source]
class GeneratingDataset.Task12AXDataset(**kwargs)[source]

12AX memory task. This is a simple memory task where there is an outer loop and an inner loop. Description here: http://psych.colorado.edu/~oreilly/pubs-abstr.html#OReillyFrank06

get_random_seq_len()[source]
generate_input_seq(seq_len)[source]

Somewhat made up probability distribution. Try to make in a way that at least some “R” will occur in the output seq. Otherwise, “R”s are really rare.

classmethod make_output_seq(input_seq)[source]
Return type:list[int]
estimate_output_class_priors(num_trials, seq_len=10)[source]
Return type:(float, float)
generate_seq(seq_idx)[source]
class GeneratingDataset.TaskEpisodicCopyDataset(**kwargs)[source]

Episodic Copy memory task. This is a simple memory task where we need to remember a sequence. Described in: http://arxiv.org/abs/1511.06464 Also tested for Associative LSTMs. This is a variant where the lengths are random, both for the chars and for blanks.

generate_input_seq()[source]
classmethod make_output_seq(input_seq)[source]
Return type:list[int]
generate_seq(seq_idx)[source]
class GeneratingDataset.TaskXmlModelingDataset(limit_stack_depth=4, **kwargs)[source]

XML modeling memory task. This is a memory task where we need to remember a stack. Defined in Jozefowicz et al. (2015). Also tested for Associative LSTMs.

generate_input_seq()[source]
classmethod make_output_seq(input_seq)[source]
Return type:list[int]
generate_seq(seq_idx)[source]
class GeneratingDataset.TaskVariableAssignmentDataset(**kwargs)[source]

Variable Assignment memory task. This is a memory task to test for key-value retrieval. Defined in Associative LSTM paper.

generate_input_seq()[source]
classmethod make_output_seq(input_seq)[source]
Return type:list[int]
generate_seq(seq_idx)[source]
class GeneratingDataset.DummyDataset(input_dim, output_dim, num_seqs, seq_len=2, input_max_value=10.0, input_shift=None, input_scale=None, **kwargs)[source]
generate_seq(seq_idx)[source]
class GeneratingDataset.StaticDataset(data, target_list=None, output_dim=None, input_dim=None, **kwargs)[source]
generate_seq(seq_idx)[source]
get_target_list()[source]
class GeneratingDataset.CopyTaskDataset(nsymbols, minlen=0, maxlen=0, minlen_epoch_factor=0, maxlen_epoch_factor=0, **kwargs)[source]
get_random_seq_len()[source]
generate_seq(seq_idx)[source]
Return type:DatasetSeq
GeneratingDataset.demo()[source]