|
| Blob (const int num, const int channels, const int height, const int width) |
| Deprecated; use Blob(const vector<int>& shape) .
|
|
| Blob (const vector< int > &shape) |
|
void | Reshape (const int num, const int channels, const int height, const int width) |
| Deprecated; use Reshape(const vector<int>& shape) .
|
|
void | Reshape (const vector< int > &shape) |
| Change the dimensions of the blob, allocating new memory if necessary. More...
|
|
void | Reshape (const BlobShape &shape) |
|
void | ReshapeLike (const Blob &other) |
|
string | shape_string () const |
|
const vector< int > & | shape () const |
|
int | shape (int index) const |
| Returns the dimension of the index-th axis (or the negative index-th axis from the end, if index is negative). More...
|
|
int | num_axes () const |
|
int | count () const |
|
int | count (int start_axis, int end_axis) const |
| Compute the volume of a slice; i.e., the product of dimensions among a range of axes. More...
|
|
int | count (int start_axis) const |
| Compute the volume of a slice spanning from a particular first axis to the final axis. More...
|
|
int | CanonicalAxisIndex (int axis_index) const |
| Returns the 'canonical' version of a (usually) user-specified axis, allowing for negative indexing (e.g., -1 for the last axis). More...
|
|
int | num () const |
| Deprecated legacy shape accessor num: use shape(0) instead.
|
|
int | channels () const |
| Deprecated legacy shape accessor channels: use shape(1) instead.
|
|
int | height () const |
| Deprecated legacy shape accessor height: use shape(2) instead.
|
|
int | width () const |
| Deprecated legacy shape accessor width: use shape(3) instead.
|
|
int | LegacyShape (int index) const |
|
int | offset (const int n, const int c=0, const int h=0, const int w=0) const |
|
int | offset (const vector< int > &indices) const |
|
void | CopyFrom (const Blob< Dtype > &source, bool copy_diff=false, bool reshape=false) |
| Copy from a source Blob. More...
|
|
Dtype | data_at (const int n, const int c, const int h, const int w) const |
|
Dtype | diff_at (const int n, const int c, const int h, const int w) const |
|
Dtype | data_at (const vector< int > &index) const |
|
Dtype | diff_at (const vector< int > &index) const |
|
const shared_ptr< SyncedMemory > & | data () const |
|
const shared_ptr< SyncedMemory > & | diff () const |
|
const Dtype * | cpu_data () const |
|
void | set_cpu_data (Dtype *data) |
|
const int * | gpu_shape () const |
|
const Dtype * | gpu_data () const |
|
void | set_gpu_data (Dtype *data) |
|
const Dtype * | cpu_diff () const |
|
const Dtype * | gpu_diff () const |
|
Dtype * | mutable_cpu_data () |
|
Dtype * | mutable_gpu_data () |
|
Dtype * | mutable_cpu_diff () |
|
Dtype * | mutable_gpu_diff () |
|
void | Update () |
|
void | FromProto (const BlobProto &proto, bool reshape=true) |
|
void | ToProto (BlobProto *proto, bool write_diff=false) const |
|
Dtype | asum_data () const |
| Compute the sum of absolute values (L1 norm) of the data.
|
|
Dtype | asum_diff () const |
| Compute the sum of absolute values (L1 norm) of the diff.
|
|
Dtype | sumsq_data () const |
| Compute the sum of squares (L2 norm squared) of the data.
|
|
Dtype | sumsq_diff () const |
| Compute the sum of squares (L2 norm squared) of the diff.
|
|
void | scale_data (Dtype scale_factor) |
| Scale the blob data by a constant factor.
|
|
void | scale_diff (Dtype scale_factor) |
| Scale the blob diff by a constant factor.
|
|
void | ShareData (const Blob &other) |
| Set the data_ shared_ptr to point to the SyncedMemory holding the data_ of Blob other – useful in Layers which simply perform a copy in their Forward pass. More...
|
|
void | ShareDiff (const Blob &other) |
| Set the diff_ shared_ptr to point to the SyncedMemory holding the diff_ of Blob other – useful in Layers which simply perform a copy in their Forward pass. More...
|
|
bool | ShapeEquals (const BlobProto &other) |
|
template<> |
void | Update () |
|
template<> |
void | Update () |
|
template<> |
unsigned int | asum_data () const |
|
template<> |
int | asum_data () const |
|
template<> |
unsigned int | asum_diff () const |
|
template<> |
int | asum_diff () const |
|
template<> |
unsigned int | sumsq_data () const |
|
template<> |
int | sumsq_data () const |
|
template<> |
unsigned int | sumsq_diff () const |
|
template<> |
int | sumsq_diff () const |
|
template<> |
void | scale_data (unsigned int scale_factor) |
|
template<> |
void | scale_data (int scale_factor) |
|
template<> |
void | scale_diff (unsigned int scale_factor) |
|
template<> |
void | scale_diff (int scale_factor) |
|
template<> |
void | ToProto (BlobProto *proto, bool write_diff) const |
|
template<> |
void | ToProto (BlobProto *proto, bool write_diff) const |
|
template<typename Dtype>
class caffe::Blob< Dtype >
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers, Nets, and Solvers interact.
TODO(dox): more thorough description.