Torch std::shared_ptr<torch:nn:Module>has no member named 'value'?

for(auto m: this->modules()){
if ( == “torch::nn::Conv2dImpl”){

error: ‘class std::shared_ptrtorch::nn::Module’ has no member named ‘value’

how can i solve ? I would be happy if you help.

This is a 2 years old example. Many code changed during this period, if you want this example working.
Please try older version of libtorch, eg. 1.4 or even older.

Thank you,

I will install and try torch 1.4.