/// <summary> /// The constructor. /// </summary> /// <param name="imycaffe">Specifies the instance of the MyCaffeControl to use.</param> /// <param name="idb">Specifies the instance of the streaming database to use.</param> public MgrPreprocessor(IXMyCaffe <T> imycaffe, IXStreamDatabase idb) { m_mycaffe = (MyCaffeControl <T>)imycaffe; m_idb = idb; m_extension = new Extension <T>(imycaffe as IXMyCaffeExtension <T>); m_blobInput = new Blob <T>(m_mycaffe.Cuda, m_mycaffe.Log); m_blobOutput = new Blob <T>(m_mycaffe.Cuda, m_mycaffe.Log); }
/// <summary> /// Initialize the Data Processor. /// </summary> /// <param name="imycaffe">Specifies the instance of MyCaffe to use.</param> /// <param name="idb">Specifies the instance of the streaming database to use.</param> /// <param name="strPreProcessorDLLPath">Specifies the path to the preprocessing DLL to use.</param> public void Initialize(IXMyCaffe <T> imycaffe, IXStreamDatabase idb, string strPreProcessorDLLPath, PropertySet properties) { m_mgrPreprocessor = new MgrPreprocessor <T>(imycaffe, idb); int nFields = properties.GetPropertyAsInt("Fields", 0); int nDepth = properties.GetPropertyAsInt("Depth", 0); if (nFields == 0) { throw new Exception("You must specify the 'Fields' property with a value greater than 0."); } if (nDepth == 0) { throw new Exception("You must specify the 'Depth' property with a value greater than 0."); } m_mgrPreprocessor.Initialize(strPreProcessorDLLPath, nFields, nDepth); }