I just posted something that could be related:

  
    
    
    Libtorch sequential missing an #include? C++
  
  
    OS: Ubuntu 18.04 
libtorch: 1.4 
I’ve set up libtorch as described on the site and been using it for a few weeks without problems. Now trying to use Sequential and as soon as I add the following line I can’t build: 
#include “torch/nn/modules/container/sequential.h” 
error: 
libcpp/libtorch/include/torch/csrc/api/include/torch/nn/modules/container/sequential.h:118:49: error: ‘NamedAnyModule’ was not declared in this scope 
explicit SequentialImpl(std::initializer_list named_modules) { 
The error…
  


It could be related because the first errors messages I got with Sequential were quite nebulous. I had to use SequentialImpl to get a decent error message and from there I could find a solution to my problem.