I get the same error if I initialise it like this though… do you know how I can avoid initialising it here?
struct Cascai_Network : torch::nn::Module 
{
    Cascai_Network()
    {
        optimiser = torch::optim::Adam(this->parameters(), torch::optim::AdamOptions(2e-4).beta1(0.5));
    }

    Cascai_Network(int n_features, int n_outputs);

    torch::Tensor forward(torch::Tensor x);

    //

    torch::nn::Linear fc1{nullptr};
    torch::nn::Linear fc2{nullptr};
    torch::nn::Linear fc3{nullptr};

    torch::optim::Adam optimiser;
};