How do I specify torch::nn::Upsample scale_factor?

I am tryting to specify an Upsample module in a torch::nn::Sequential argument list. The documentation in
moose/framework/contrib/libtorch/include/torch/csrc/api/include/torch/nn/options/upsampling.h
gives the example
/// model(UpsampleOptions().scale_factor({3}).mode(torch::kLinear).align_corners(false));
but I don’t know how to apply that information.
I have tried this line
torch::nn::Upsample(),
and it compiles but gets the runtime error “either size or scale_factor should be defined”.
I want to specify a scale_factor of 2. These are some of the ways that I have tried to implement this:

      torch::nn::Upsample(nullptr, 2.0),
      torch::nn::Upsample(void, 2.0),
      torch::nn::Upsample(2.0),
      torch::nn::Upsample(scale_factor{2.0}),
      torch::nn::Upsample(scale_factor={2}),
      torch::nn::Upsample(scale_factor({2})),
      torch::nn::Upsample(torch::nn::UpsampleOptions().scale_factor({2})),
      torch::nn::Upsample(torch::nn::UpsampleOptions(scale_factor({2}))),

but none of them compile.

I found the answer in pytorch cppdocs

torch::nn::Upsample(torch::nn::UpsampleOptions().scale_factor(std::vector<double>({2}))),