Caffe2 - C++ API
A deep learning, cross platform ML framework
utils.h
1 #pragma once
2 
3 #include <torch/csrc/autograd/grad_mode.h>
4 
5 #include <cstdint>
6 
7 namespace torch {
8 using autograd::AutoGradMode;
9 
10 // A RAII, thread local (!) guard that stops future operations from building
11 // gradients.
12 struct TORCH_API NoGradGuard : public AutoGradMode {
13  NoGradGuard() : AutoGradMode(/*enabled=*/false) {}
14 };
15 
17 using at::manual_seed;
18 } // namespace torch
Definition: jit_type.h:17