CNTK C# API - How to set learner module and number

2019-08-08 18:41发布

问题:

I am using CNTK C# API (Latest 2.2 release) and have following questions. (using the logisticsRegression example from GitHub and modifying it to set it for my usecase.

Using SGD and also tried SGDMomentim learners.

1. How can I set number of max iteration per sample for training. I can see LR and MR variables in SGDMomentum but nothing for iterations.

2. Is there a way to monitor how each neuron is progressing/stuck as training progresses thru each sample per iteration in the network. Or how the weight parameters were evolving in each iteration?

3. When are other learner modules expected to be released in C#? (Other then SGD and SGD momentum)?

Thanks for your help.

回答1:

  1. use TrainingParameterScheduleDouble(VectorPairSizeTDouble schedule, uint epochSize) to specify rate per multiple of epochs. (Yes the API shall be more C# friendly.) Use the input vector to specify a rate for each number of Epochs. For example: {{1, 0.05}, {2, 0.1}, {1, 0.005}} and epochSize = 100.

It means: '0.05' is used for the first 100 samples, then '0.1' is used for the second 200 samples, after which the values is switched to '0.005'

  1. To monitor parameter update: see answer to this
  2. Most learners are released in 2.2. Do you have a specific learner that is not available from C# API?


标签: c# cntk