Something like this ? Maybe you’re looking for Linear 3
struct Net : torch::nn::Module {
	Net(int32_t numIn, int32_t numOut, int32_t numHid) {
		weightsA = register_parameter("input", torch::rand({ numIn, numHid }))*0.013;
		weightsB = register_parameter("output", torch::rand({ numHid, numOut }))*0.013;
		bias = register_parameter("bias", torch::zeros({ numOut }));
	}
	torch::Tensor forward(torch::Tensor input) {
		torch::Tensor hidden_layer, output_layer;
		hidden_layer = (torch::mm(input, weightsA));
		output_layer = (torch::mm(hidden_layer, weightsB));
		output_layer += bias;
		return output_layer;
	}
	torch::Tensor weightsA, weightsB, bias;
};