Thank you! That works, and has saved out the model.
I now need to pass a converted image to the model to run inference.
I have this, but it gives me a segfault.
	std::shared_ptr<torch::jit::script::Module> module = torch::jit::load("model.pt");
	module->to(torch::kCUDA);
	assert(module != nullptr);
	std::cout << "ok\n";


	cv::Mat image;
	image = cv::imread("pic.jpeg", 1);
	cv::Mat image_resized;
	cv::resize(image, image_resized, cv::Size(224, 224));
	cv::Mat image_resized_float;
	image_resized.convertTo(image_resized_float, CV_32F, 1.0 / 255);

	auto img_tensor = torch::from_blob(image_resized_float.data, { 1, 224, 224, 3 }).to(torch::kCUDA);
	cout << "img tensor loaded..\n";


	img_tensor = img_tensor.permute({ 0, 3, 1, 2 });
	img_tensor[0][0] = img_tensor[0][0].sub(0.485).div(0.229);
	img_tensor[0][1] = img_tensor[0][1].sub(0.456).div(0.224);
	img_tensor[0][2] = img_tensor[0][2].sub(0.406).div(0.225);
	auto img_var = torch::autograd::make_variable(img_tensor, false);

	vector<torch::jit::IValue> inputs;
	inputs.push_back(img_var);
	torch::Tensor out_tensor = module->forward(inputs).toTensor(); //fault
	cout << out_tensor.slice(1, 0, 10) << '\n';

Where am i going wrong?
Thank you again for your time.