I am using C# CNTK 2.2.0 API for training. I have installed Nuget package CNTK.CPUOnly and CNTK.GPU.
I am looking for following learners in C#. 1. AdaDelta 2. Adam 3. AdaGrad 4. Neterov
Looks like Python supports these learners but C# package is not showing them.
I can see only SGD and SGDMomentun learners in C# there.
Any thoughts, how to get and set other learners in C#. Do I need to install any additional package to get these learners?
Appreciate your help.
The CNTKLib class in the CNTK namespace provides several learners, even not all of those you have listed. I list them in the following without their overloads.
public static Learner SGDLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule);
public static Learner MomentumSGDLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule, TrainingParameterScheduleDouble momentumSchedule);
public static Learner FSAdaGradLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule, TrainingParameterScheduleDouble momentumSchedule);
public static Learner AdamLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule, TrainingParameterScheduleDouble momentumSchedule);
public static Learner AdaGradLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule);
public static Learner RMSPropLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule, double gamma, double inc, double dec, double max, double min);
public static Learner AdaDeltaLearner(ParameterVector parameters, TrainingParameterScheduleDouble learningRateSchedule);
You easily can access them like the following:
using CNTK;
CNTKLib.AdaDeltaLearner([...])
This was done with the GPU version of CNTK 2.2. Maybe it is different with the CPU version.