microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.53k stars 4.28k forks source link

C# error on examples #3088

Open galvanchi opened 6 years ago

galvanchi commented 6 years ago

Hi,

I installed CNTK-2-5 from this tutorial https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Binary-Script

But when tried to run C# example from here CNTK-2-5\cntk\Examples\TrainingCSharp an error occur. Stack trace below:

   at CNTK.CNTKLibPINVOKE.SGDLearner__SWIG_1(HandleRef jarg1, HandleRef jarg2)
   at CNTK.CNTKLib.SGDLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule)
   at CNTK.CSTrainingExamples.LogisticRegression.TrainAndEvaluate(DeviceDescriptor device) in C:\Projects\CNTK-2-5\cntk\Examples\TrainingCSharp\Common\LogisticRegression.cs:line 30
   at CNTK.CSTrainingExamples.Program.Main(String[] args) in C:\Projects\CNTK-2-5\cntk\Examples\TrainingCSharp\CSTrainingGPUExamples\Program.cs:line 15

Please can you help me? What I miss? Maybe am I need to install something additional?

galvanchi commented 6 years ago

Hi, got another one error in the same GPU project. Thrace below.

   at CNTK.MinibatchSource.TextFormatMinibatchSourceInternal(String dataFilePath, StreamConfigurationVector streamConfigs, UInt64 epochSize)
   at CNTK.CSTrainingExamples.MNISTClassifier.TrainAndEvaluate(DeviceDescriptor device, Boolean useConvolution, Boolean forceRetrain) in C:\Projects\CNTK-2-5\cntk\Examples\TrainingCSharp\Common\MNISTClassifier.cs:line 79
   at CNTK.CSTrainingExamples.Program.Main(String[] args) in C:\Projects\CNTK-2-5\cntk\Examples\TrainingCSharp\CSTrainingGPUExamples\Program.cs:line 18

Main error on this line is: Plugin not found: 'Cntk.Composite-2.5.dll' That's strange because that dll exist on x64 folder.

nmfisher commented 6 years ago

I vaguely recall having a similar issue when first trying the binaries directly - IIRC there were some missing dependencies that were causing issues.

Is installing via Nuget an option for you?

galvanchi commented 6 years ago

Mhm, if I create new console project, add nuget packages for CPU and test classes for MNIST, then application goes to break mode.

nmfisher commented 6 years ago

I assume this is Visual Studio entering break mode because an exception is thrown - can you post a screenshot of the exception/call stack?

Also make sure you have uninstalled the binaries you previously installed, then reinstall via Nuget (also if you are using the GPU version, make sure your GPU drivers are up to date).