//Static methods /// <summary> /// Creates the simplified configuration of the input encoder. /// </summary> /// <remarks> /// Supports only external input fields of the the real numbers. /// </remarks> /// <param name="feedingCfg">The configuration of the input feeding.</param> /// <param name="spikesCoderCfg">The configuration of the input spikes coder.</param> /// <param name="extFieldNameCollection">The collection of the external input field names.</param> /// <param name="routeToReadout">Specifies whether to route inputs to readout layer.</param> public static InputEncoderSettings CreateInputCfg(IFeedingSettings feedingCfg, InputSpikesCoderSettings spikesCoderCfg, IEnumerable <string> extFieldNameCollection, bool routeToReadout = true ) { if (feedingCfg == null) { throw new ArgumentNullException("feedingCfg"); } if (spikesCoderCfg == null) { spikesCoderCfg = new InputSpikesCoderSettings(); } List <ExternalFieldSettings> extFieldCollection = new List <ExternalFieldSettings>(); foreach (string name in extFieldNameCollection) { extFieldCollection.Add(new ExternalFieldSettings(name, new RealFeatureFilterSettings(), routeToReadout)); } ExternalFieldsSettings extFieldsCfg = new ExternalFieldsSettings(extFieldCollection); VaryingFieldsSettings fieldsCfg = new VaryingFieldsSettings(spikesCoderCfg, extFieldsCfg, null, null, routeToReadout); return(new InputEncoderSettings(feedingCfg, fieldsCfg)); }
/// <summary> /// Creates the simplified configuration of the input encoder. /// </summary> /// <remarks> /// Supports only external input fields. /// </remarks> /// <param name="feedingCfg">The configuration of the input feeding.</param> /// <param name="spikesCoderCfg">The configuration of the input spikes coder.</param> /// <param name="routeToReadout">Specifies whether to route inputs to readout layer.</param> /// <param name="externalFieldCfg">The external input field configurations.</param> public static InputEncoderSettings CreateInputCfg(IFeedingSettings feedingCfg, InputSpikesCoderSettings spikesCoderCfg, bool routeToReadout, params ExternalFieldSettings[] externalFieldCfg ) { if (feedingCfg == null) { throw new ArgumentNullException("feedingCfg"); } return(new InputEncoderSettings(feedingCfg, new VaryingFieldsSettings(spikesCoderCfg, new ExternalFieldsSettings(externalFieldCfg), null, null, routeToReadout ) )); }