Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
c10::Scalar Class Reference

Scalar represents a 0-dimensional tensor which contains a single element. More...

#include <Scalar.h>

Public Member Functions

template<typename T >
T to ()
 
bool isFloatingPoint () const
 
bool isIntegral () const
 
bool isComplex () const
 
Scalar operator- () const
 

Detailed Description

Scalar represents a 0-dimensional tensor which contains a single element.

Unlike a tensor, numeric literals (in C++) are implicitly convertible to Scalar (which is why, for example, we provide both add(Tensor) and add(Scalar) overloads for many operations). It may also be used in circumstances where you statically know a tensor is 0-dim and single size, but don't know it's type.

Definition at line 22 of file Scalar.h.


The documentation for this class was generated from the following files: