|
std::stringstream & | operator>> (std::stringstream &in, torch::Tensor &) |
| This is a dummy to prevent compilers whining about not know how to >> torch::Tensor.
|
|
std::vector< std::string > | split (const std::string &str, const std::string &delims) |
|
std::string | trim (const std::string &str, const std::string &white_space) |
|
bool | start_with (std::string_view str, std::string_view prefix) |
|
bool | end_with (std::string_view str, std::string_view suffix) |
|
template<> |
void | parse_ (bool &val, const std::string &raw_str) |
|
template<> |
void | parse_vector_ (std::vector< bool > &vals, const std::string &raw_str) |
|
template<> |
void | parse_ (VariableName &val, const std::string &raw_str) |
|
template<> |
void | parse_ (TensorShape &val, const std::string &raw_str) |
|
std::string | demangle (const char *name) |
| Demangle a piece of cxx abi type information.
|
|
Size | storage_size (TensorShapeRef shape) |
| The flattened storage size of a tensor with given shape.
|
|
TensorShape | pad_prepend (TensorShapeRef s, Size dim, Size pad=1) |
| Pad shape s to dimension dim by prepending sizes of pad .
|
|
TensorShape | pad_append (TensorShapeRef s, Size dim, Size pad=1) |
| Pad shape s to dimension dim by appending sizes of pad .
|
|
std::string | indentation (int level, int indent) |
|
bool | allclose (const LabeledVector &a, const LabeledVector &b, Real rtol, Real atol) |
|
template<typename T > |
void | parse_ (T &val, const std::string &raw_str) |
|
template<typename T > |
T | parse (const std::string &raw_str) |
|
template<typename T > |
void | parse_vector_ (std::vector< T > &vals, const std::string &raw_str) |
|
template<typename T > |
std::vector< T > | parse_vector (const std::string &raw_str) |
|
template<typename T > |
void | parse_vector_vector_ (std::vector< std::vector< T > > &vals, const std::string &raw_str) |
|
template<typename T > |
std::vector< std::vector< T > > | parse_vector_vector (const std::string &raw_str) |
|
template<> |
void | parse_< bool > (bool &, const std::string &raw_str) |
|
template<> |
void | parse_vector_< bool > (std::vector< bool > &, const std::string &raw_str) |
| This special one is for the evil std::vector<bool>!
|
|
template<> |
void | parse_< TensorShape > (TensorShape &, const std::string &raw_str) |
|
template<> |
void | parse_< VariableName > (VariableName &, const std::string &raw_str) |
|
template<class... T> |
bool | sizes_same (T &&... shapes) |
| Check if all shapes are the same.
|
|
template<class... T> |
bool | sizes_broadcastable (T &&... shapes) |
| Check if the shapes are broadcastable.
|
|
template<class... T> |
TensorShape | broadcast_sizes (T &&... shapes) |
| Return the broadcast shape of all the shapes.
|
|
template<typename... S> |
TensorShape | add_shapes (S &&... shape) |
|
template<typename T > |
std::string | stringify (const T &t) |
|
template<> |
std::string | stringify (const bool &t) |
|