#pragma once #include #include #include namespace torch { namespace autograd { using hooks_list = std::vector>; struct CppFunctionPreHook : public FunctionPreHook { CppFunctionPreHook(const std::shared_ptr &hooks, int value_idx); variable_list operator()(const variable_list& values) override; std::shared_ptr hooks_; int value_idx_; }; }} // namespace torch::autograd