Exception at Carpole tutorial: not enough values to unpack (expected 2, got 1)
I am trying to build a DQN like in the DQN paper from DeepMind, and trying to follow the tutorial https://github.com/Microsoft/CNTK/blob/v2.0.beta3.0/bindings/python/tutorials/CNTK_203_Reinforcement_Learning_Basics.ipynb
I run to some problems, first I fixed the learning rate problem, but then come to any other problem, when the code runs to the point of creating the trainner, I get the error message at the end of the following code:
learning_rate /= BATCH_SIZE
lr_schedule = learning_rate_schedule(learning_rate, UnitType.minibatch)
learner = sgd(model.parameters, lr_schedule, gradient_clipping_threshold_per_sample=10)
trainer = Trainer(model, loss, meas, [learner]) #Error message pops out at this line
Message: not enough values to unpack (expected 2, got 1)
I am working on Windows 10, with VS 2015, and using Python Tool for Visual Studio, any one has tried this tutorial without any problem? Thanks.
Can you use UnitType.sample. And specify the learning rate you need per sample. That way you will guarantee each sample gets the same learning rate. Haven't tried with PTVS but we have nightly tests for the tutorial that uses the build on Windows with VS2015. Usually, we recommend using the notebooks be run in native jupyter notebook environment. Though I have also used PyCharm environment.
@sayanpa I found the issue, the line creates the learner should be changed to
trainer = Trainer(model, (loss, meas), learner)
I guess this may due to the modification of the internal data structure, while the tutorial code is not updated. Thanks!