my os:
windows 10
libtorch 1.1
visual studio 2015
when I code like this:
#include 
#include “torch/script.h”
#include “torch/torch.h”
using namespace std;
using namespace torch;
int main()
{
nn::Sequential(nn::Conv2d(nn::Conv2dOptions(10, 256, 4)
.with_bias(false)
.transposed(true)));
cout << “Hello LibTorch” << endl;
return 0;
}
I compiled and got the error:
D:\BUILD\libtorch_release_110\include\torch/csrc/utils/variadic.h(195): error C2059: syntax error: ‘template’
D:\BUILD\libtorch_release_110\include\torch/csrc/utils/variadic.h(190): note: see reference to function template instantiation ‘ReturnType torch::unpack<ReturnType,const at::Tensor&,torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,const at::Tensor &>::InvokeForward,torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,const 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,const at::Tensor &>::InvokeForward,
Accessor=torch::nn::AnyModule::Holder<torch::nn::Conv2dImpl,const at::Tensor &>::CheckedGetter
]
anyone can solve the problem?