Open maxiaoyuelun opened 5 years ago
I think nn::Sequential cause the problem, when i use nn::Module to rewrite the code, the code with nn::Module got the right answer, but the code with nn::Sequential just got compile error. I don't know how to solve the problem!!!
I tested on the very latest libtorch and find that the nn::Sequential can't work in windows with viusal studio, anyone catch the problem?
I think nn::Sequential cause the problem, when i use nn::Module to rewrite the code, the code with nn::Module got the right answer, but the code with nn::Sequential just got compile error. I don't know how to solve the problem!!!
I tested on the very latest libtorch and find that the nn::Sequential can't work in windows with viusal studio, anyone catch the problem?
I tried to compile it with Cmake first. Then I can use Visual Studio to run the dcgan example.
Actually I also have some questions about these examples. Could you give me your contact like wechat so I can talk with you directly? Thanks :)
my os: windows 10 libtorch 1.0 visual studio 2015
I run cpp/mnist and got the right answer, but when I run cpp/dcgan, I got the error in file :
D:\BUILD\libtorch\include\torch/csrc/utils/variadic.h(195): error C2059: syntax error: 'template' D:\BUILD\libtorch\include\torch/csrc/utils/variadic.h(190): note: see reference to function template instantiation 'ReturnType torch::unpack<ReturnType,at::Tensor,torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,at::Tensor>::InvokeForward,torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,at::Tensor>::CheckedGetter,0>(Function,Accessor,torch::Indices<0>)' being compiled with [ ReturnType=torch::nn::AnyModule::Value, Function=torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,at::Tensor>::InvokeForward, Accessor=torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,at::Tensor>::CheckedGetter ]
I just check for one night, can anyone catch the same problem?