Provides LayerNetworkDescription.

class NetworkDescription.LayerNetworkDescription(num_inputs, num_outputs, hidden_info, output_info, default_layer_info, bidirectional=True, sharpgates='none', truncation=-1, entropy=0)[source]

This class is used as a description to build up the LayerNetwork. The other options to build up a LayerNetwork are JSON or from a HDF model.

  • hidden_info (list[dict[str]]) – list of (layer_type, size, activation, name)
  • sharpgates (str) – see LSTM layers
  • truncation (int) – number of steps to use in truncated BPTT or -1. see theano.scan
  • entropy (float) –

classmethod from_config(config)[source]
Return type:LayerNetworkDescription
classmethod loss_from_config(config)[source]
Return type:str
classmethod tf_extern_data_types_from_config(config)[source]
Parameters:config (Config.Config) –
Returns:dict data_key -> kwargs of Data
Return type:dict[str,dict[str]]
classmethod num_inputs_outputs_from_config(config)[source]
:returns (num_inputs, num_outputs),

where num_inputs is like num_outputs[“data”][0], and num_outputs is a dict of data_key -> (dim, ndim),

where data_key is e.g. “classes” or “data”, dim is the feature dimension or the number of classes, and ndim is the ndim counted without batch-dim, i.e. ndim=1 means usually sparse data and ndim=2 means dense data.
Return type:(int,dict[str,(int,int)])
to_json_content(self, mask=None)[source]
Parameters:| str mask (None) – mask
Return type:dict