/home/rakesh/rishabh_workspace/Garbage/LMtesting/LMtesting.cpp:65:64:error: conversion from ‘ c10::IValue ’ to non-scalar type ‘ at::Tensor ’ requested
get_method returns an IValue, which you can sort of think of as like a PyObject. You need to explicitly cast it to the C++ type you want, so you should do hidden.toTensor() to get an at::Tensor.