EngineUtil

Contains utility functions to construct a batch. This is used both by Theano and TF.

EngineUtil.assign_dev_data(device, dataset, batches, load_seqs=True)[source]
Parameters:load_seqs (bool) –

:returns successful and how much batch idx to advance. :rtype: (bool,int)

EngineUtil.assign_dev_data_single_seq(device, dataset, seq, load_seqs=True)[source]
Parameters:
  • seq (int) – sorted seq idx
  • load_seqs (bool) –
Returns:

whether we succeeded

Return type:

bool

EngineUtil.maybe_subtract_priors(network, train, config)[source]