Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
torch
csrc
autograd
utils
python_error_messages.h
1
#pragma once
2
3
#include <sstream>
4
5
namespace
torch
{
namespace
autograd {
namespace
utils {
6
7
inline
std::string requires_grad_leaf_error(
bool
requires_grad) {
8
std::ostringstream oss;
9
oss <<
"you can only change requires_grad flags of leaf variables."
;
10
if
(requires_grad ==
false
) {
11
oss <<
" If you want to use a computed variable in a subgraph "
12
"that doesn't require differentiation use "
13
"var_no_grad = var.detach()."
;
14
}
15
return
oss.str();
16
}
17
18
}}}
// namespace torch::autograd::utils
torch
Definition:
jit_type.h:17
Generated on Thu Mar 21 2019 13:06:22 for Caffe2 - C++ API by
1.8.11