Problem using han_window()

Hi everyone,
first of all I’d like to ask if anybody know where libtorch’s documentation has disappeared?

and for my main question…
when I’m trying to use the function i get an exception. Example:

torch::Tensor win = torch::hann_window(512, true, torch::TensorOptions().requires_grad(false));

implies the following exception:

Unhandled exception at 0x00007FF9C386474C in project.exe: Microsoft C++ exception: c10::Error at memory location 0x00000026850FBC80.

I’m using visual studio and running everything on the cpu.

please help, thank you.

The docs can still be found here and I’m unaware of any removal. Could you describe which parts were removed from there?

This error is quite cryptic, but I get a dtype mismatch when executing your code on Linux, which is fixed via:

#include <torch/script.h> // One-stop header.
#include <iostream>

int main(int argc, const char* argv[]) {
  torch::Tensor win = torch::hann_window(512, true, at::TensorOptions().dtype(at::kFloat).requires_grad(false));
  std::cout << win << std::endl;
  return 0;

thank you very much, it indeed solved the problem.
in documentation i ment method level documentation, this is a link that’s no longer active for example: