Omegastick/pytorch-cpp-rl

When build under Ubuntu 18 have error "error: ‘double torch::optim::RMSpropOptions::learning_rate_’ is private within this context..""

geotyper opened this issue · 4 comments

In member function ‘virtual std::vectorcpprl::UpdateDatum cpprl::A2C::update(cpprl::RolloutStorage&, float)’:
/home/geotyper/CPP_torch/pytorch-cpp-rl-master/src/algorithms/a2c.cpp:39:24: error: ‘double torch::optim::RMSpropOptions::learning_rate_’ is private within this context
optimizer->options.learning_rate_ = original_learning_rate * decay_level;

Just got this error on the Windows CI build, but not the Ubuntu one. It's building fine on my home PCs too. Looking into it now.

Maybe an incompatibility with PyTorch 1.3?

Looks like pytorch/pytorch@ce3d024 broke it. I'll get a fix up once I've built PyTorch 1.3 on my PC.

found that if change to
optimizer->options.learning_rate(original_learning_rate * decay_level); //options.learning_rate_
compiles without errors

Should be fixed in e1844a1.