Your code runs fine in my environment, is there any reason why forward method is not implemented ?
torch::Tensor forward(torch::Tensor x)
{
	x = fc1->forward(x);
	x = fc2->forward(x);
	x = fc3->forward(x);
	return x;
}