Applies common transformations to the input data, such as scaling, mirroring, substracting the image mean...
More...
#include <data_transformer.hpp>
|
| DataTransformer (const TransformationParameter ¶m, Phase phase) |
|
void | InitRand () |
| Initialize the Random number generations if needed by the transformation.
|
|
void | Transform (const Datum &datum, Blob< Dtype > *transformed_blob) |
| Applies the transformation defined in the data layer's transform_param block to the data. More...
|
|
void | Transform (const vector< Datum > &datum_vector, Blob< Dtype > *transformed_blob) |
| Applies the transformation defined in the data layer's transform_param block to a vector of Datum. More...
|
|
void | Transform (Blob< Dtype > *input_blob, Blob< Dtype > *transformed_blob) |
| Applies the same transformation defined in the data layer's transform_param block to all the num images in a input_blob. More...
|
|
vector< int > | InferBlobShape (const Datum &datum) |
| Infers the shape of transformed_blob will have when the transformation is applied to the data. More...
|
|
vector< int > | InferBlobShape (const vector< Datum > &datum_vector) |
| Infers the shape of transformed_blob will have when the transformation is applied to the data. It uses the first element to infer the shape of the blob. More...
|
|
|
virtual int | Rand (int n) |
| Infers the shape of transformed_blob will have when the transformation is applied to the data. It uses the first element to infer the shape of the blob. More...
|
|
void | Transform (const Datum &datum, Dtype *transformed_data) |
|
|
TransformationParameter | param_ |
|
shared_ptr< Caffe::RNG > | rng_ |
|
Phase | phase_ |
|
Blob< Dtype > | data_mean_ |
|
vector< Dtype > | mean_values_ |
|
template<typename Dtype>
class caffe::DataTransformer< Dtype >
Applies common transformations to the input data, such as scaling, mirroring, substracting the image mean...
◆ InferBlobShape() [1/2]
template<typename Dtype >
Infers the shape of transformed_blob will have when the transformation is applied to the data.
- Parameters
-
datum | Datum containing the data to be transformed. |
◆ InferBlobShape() [2/2]
template<typename Dtype >
Infers the shape of transformed_blob will have when the transformation is applied to the data. It uses the first element to infer the shape of the blob.
- Parameters
-
datum_vector | A vector of Datum containing the data to be transformed. |
◆ Rand()
template<typename Dtype >
Infers the shape of transformed_blob will have when the transformation is applied to the data. It uses the first element to infer the shape of the blob.
- Parameters
-
mat_vector | A vector of Mat containing the data to be transformed. Generates a random integer from Uniform({0, 1, ..., n-1}). |
n | The upperbound (exclusive) value of the random number. |
- Returns
- A uniformly random integer value from ({0, 1, ..., n-1}).
◆ Transform() [1/3]
template<typename Dtype >
Applies the transformation defined in the data layer's transform_param block to the data.
- Parameters
-
datum | Datum containing the data to be transformed. |
transformed_blob | This is destination blob. It can be part of top blob's data if set_cpu_data() is used. See data_layer.cpp for an example. |
◆ Transform() [2/3]
template<typename Dtype >
Applies the transformation defined in the data layer's transform_param block to a vector of Datum.
- Parameters
-
datum_vector | A vector of Datum containing the data to be transformed. |
transformed_blob | This is destination blob. It can be part of top blob's data if set_cpu_data() is used. See memory_layer.cpp for an example. |
◆ Transform() [3/3]
template<typename Dtype >
Applies the same transformation defined in the data layer's transform_param block to all the num images in a input_blob.
- Parameters
-
input_blob | A Blob containing the data to be transformed. It applies the same transformation to all the num images in the blob. |
transformed_blob | This is destination blob, it will contain as many images as the input blob. It can be part of top blob's data. |
The documentation for this class was generated from the following files: