Caffe
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
caffe::WindowDataLayer< Dtype > Class Template Reference

Provides data to the Net from windows of images files, specified by a window data file. This layer is DEPRECATED and only kept for archival purposes for use by the original R-CNN. More...

#include <window_data_layer.hpp>

Inheritance diagram for caffe::WindowDataLayer< Dtype >:
caffe::BasePrefetchingDataLayer< Dtype > caffe::BaseDataLayer< Dtype > caffe::InternalThread caffe::Layer< Dtype >

Public Member Functions

 WindowDataLayer (const LayerParameter &param)
 
virtual void DataLayerSetUp (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 
virtual const char * type () const
 Returns the layer type.
 
virtual int ExactNumBottomBlobs () const
 Returns the exact number of bottom blobs required by the layer, or -1 if no exact number is required. More...
 
virtual int ExactNumTopBlobs () const
 Returns the exact number of top blobs required by the layer, or -1 if no exact number is required. More...
 
- Public Member Functions inherited from caffe::BasePrefetchingDataLayer< Dtype >
 BasePrefetchingDataLayer (const LayerParameter &param)
 
void LayerSetUp (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Does layer-specific setup: your layer should implement this function as well as Reshape. More...
 
virtual void Forward_cpu (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Using the CPU device, compute the layer output.
 
virtual void Forward_gpu (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Using the GPU device, compute the layer output. Fall back to Forward_cpu() if unavailable.
 
- Public Member Functions inherited from caffe::BaseDataLayer< Dtype >
 BaseDataLayer (const LayerParameter &param)
 
virtual void Reshape (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs. More...
 
virtual void Backward_cpu (const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
 Using the CPU device, compute the gradients for any parameters and for the bottom blobs if propagate_down is true.
 
virtual void Backward_gpu (const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
 Using the GPU device, compute the gradients for any parameters and for the bottom blobs if propagate_down is true. Fall back to Backward_cpu() if unavailable.
 
- Public Member Functions inherited from caffe::Layer< Dtype >
 Layer (const LayerParameter &param)
 
void SetUp (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Implements common layer setup functionality. More...
 
Dtype Forward (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 Given the bottom blobs, compute the top blobs and the loss. More...
 
void Backward (const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
 Given the top blob error gradients, compute the bottom blob error gradients. More...
 
vector< shared_ptr< Blob< Dtype > > > & blobs ()
 Returns the vector of learnable parameter blobs.
 
const LayerParameter & layer_param () const
 Returns the layer parameter.
 
virtual void ToProto (LayerParameter *param, bool write_diff=false)
 Writes the layer parameter to a protocol buffer.
 
Dtype loss (const int top_index) const
 Returns the scalar loss associated with a top blob at a given index.
 
void set_loss (const int top_index, const Dtype value)
 Sets the loss associated with a top blob at a given index.
 
virtual int MinBottomBlobs () const
 Returns the minimum number of bottom blobs required by the layer, or -1 if no minimum number is required. More...
 
virtual int MaxBottomBlobs () const
 Returns the maximum number of bottom blobs required by the layer, or -1 if no maximum number is required. More...
 
virtual int MinTopBlobs () const
 Returns the minimum number of top blobs required by the layer, or -1 if no minimum number is required. More...
 
virtual int MaxTopBlobs () const
 Returns the maximum number of top blobs required by the layer, or -1 if no maximum number is required. More...
 
virtual bool EqualNumBottomTopBlobs () const
 Returns true if the layer requires an equal number of bottom and top blobs. More...
 
virtual bool AutoTopBlobs () const
 Return whether "anonymous" top blobs are created automatically by the layer. More...
 
virtual bool AllowForceBackward (const int bottom_index) const
 Return whether to allow force_backward for a given bottom blob index. More...
 
bool param_propagate_down (const int param_id)
 Specifies whether the layer should compute gradients w.r.t. a parameter at a particular index given by param_id. More...
 
void set_param_propagate_down (const int param_id, const bool value)
 Sets whether the layer should compute gradients w.r.t. a parameter at a particular index given by param_id.
 
- Public Member Functions inherited from caffe::InternalThread
void StartInternalThread ()
 
void StopInternalThread ()
 
bool is_started () const
 

Protected Types

enum  WindowField {
  IMAGE_INDEX, LABEL, OVERLAP, X1,
  Y1, X2, Y2, NUM
}
 

Protected Member Functions

virtual unsigned int PrefetchRand ()
 
virtual void load_batch (Batch< Dtype > *batch)
 
- Protected Member Functions inherited from caffe::BasePrefetchingDataLayer< Dtype >
virtual void InternalThreadEntry ()
 
- Protected Member Functions inherited from caffe::Layer< Dtype >
virtual void CheckBlobCounts (const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
 
void SetLossWeights (const vector< Blob< Dtype > *> &top)
 
- Protected Member Functions inherited from caffe::InternalThread
bool must_stop ()
 

Protected Attributes

shared_ptr< Caffe::RNGprefetch_rng_
 
vector< std::pair< std::string, vector< int > > > image_database_
 
vector< vector< float > > fg_windows_
 
vector< vector< float > > bg_windows_
 
Blob< Dtype > data_mean_
 
vector< Dtype > mean_values_
 
bool has_mean_file_
 
bool has_mean_values_
 
bool cache_images_
 
vector< std::pair< std::string, Datum > > image_database_cache_
 
- Protected Attributes inherited from caffe::BasePrefetchingDataLayer< Dtype >
vector< shared_ptr< Batch< Dtype > > > prefetch_
 
BlockingQueue< Batch< Dtype > * > prefetch_free_
 
BlockingQueue< Batch< Dtype > * > prefetch_full_
 
Batch< Dtype > * prefetch_current_
 
Blob< Dtype > transformed_data_
 
- Protected Attributes inherited from caffe::BaseDataLayer< Dtype >
TransformationParameter transform_param_
 
shared_ptr< DataTransformer< Dtype > > data_transformer_
 
bool output_labels_
 
- Protected Attributes inherited from caffe::Layer< Dtype >
LayerParameter layer_param_
 
Phase phase_
 
vector< shared_ptr< Blob< Dtype > > > blobs_
 
vector< bool > param_propagate_down_
 
vector< Dtype > loss_
 

Detailed Description

template<typename Dtype>
class caffe::WindowDataLayer< Dtype >

Provides data to the Net from windows of images files, specified by a window data file. This layer is DEPRECATED and only kept for archival purposes for use by the original R-CNN.

TODO(dox): thorough documentation for Forward and proto params.

Member Function Documentation

◆ ExactNumBottomBlobs()

template<typename Dtype >
virtual int caffe::WindowDataLayer< Dtype >::ExactNumBottomBlobs ( ) const
inlinevirtual

Returns the exact number of bottom blobs required by the layer, or -1 if no exact number is required.

This method should be overridden to return a non-negative value if your layer expects some exact number of bottom blobs.

Reimplemented from caffe::Layer< Dtype >.

◆ ExactNumTopBlobs()

template<typename Dtype >
virtual int caffe::WindowDataLayer< Dtype >::ExactNumTopBlobs ( ) const
inlinevirtual

Returns the exact number of top blobs required by the layer, or -1 if no exact number is required.

This method should be overridden to return a non-negative value if your layer expects some exact number of top blobs.

Reimplemented from caffe::Layer< Dtype >.


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