Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BVLC/caffe
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b28e03dda611985d8369b0aa8e577b25b416c83d
Choose a base ref
..
head repository: BVLC/caffe
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ae4a5b126e9e44ff2d2712ad4c7d3bd12e83c71e
Choose a head ref
Showing with 0 additions and 389 deletions.
  1. +0 −63 include/caffe/common_layers.hpp
  2. +0 −128 src/caffe/layers/filter_layer.cpp
  3. +0 −70 src/caffe/layers/filter_layer.cu
  4. +0 −128 src/caffe/test/test_filter_layer.cpp
63 changes: 0 additions & 63 deletions include/caffe/common_layers.hpp
Original file line number Diff line number Diff line change
@@ -180,69 +180,6 @@ class EltwiseLayer : public Layer<Dtype> {
bool stable_prod_grad_;
};

/**
* @brief Takes two+ Blobs, interprets last Blob as a selector and
* filter remaining Blobs accordingly with selector data (0 means that
* the corresponding item has to be filtered, non-zero means that corresponding
* item needs to stay).
*/
template <typename Dtype>
class FilterLayer : public Layer<Dtype> {
public:
explicit FilterLayer(const LayerParameter& param)
: Layer<Dtype>(param) {}
virtual void LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);
virtual void Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);

virtual inline const char* type() const { return "Filter"; }
virtual inline int MinBottomBlobs() const { return 2; }
virtual inline int MinTopBlobs() const { return 1; }

protected:
/**
* @param bottom input Blob vector (length 2+)
* -# @f$ (N \times C \times H \times W) @f$
* the inputs to be filtered @f$ x_1 @f$
* -# ...
* -# @f$ (N \times C \times H \times W) @f$
* the inputs to be filtered @f$ x_K @f$
* -# @f$ (N \times 1 \times 1 \times 1) @f$
* the selector blob
* @param top output Blob vector (length 1+)
* -# @f$ (S \times C \times H \times W) @f$ ()
* the filtered output @f$ x_1 @f$
* where S is the number of items
* that haven't been filtered
* @f$ (S \times C \times H \times W) @f$
* the filtered output @f$ x_K @f$
* where S is the number of items
* that haven't been filtered
*/
virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);
virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);

/**
* @brief Computes the error gradient w.r.t. the forwarded inputs.
*
* @param top output Blob vector (length 1+), providing the error gradient with
* respect to the outputs
* @param propagate_down see Layer::Backward.
* @param bottom input Blob vector (length 2+), into which the top error
* gradient is copied
*/
virtual void Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom);
virtual void Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom);

bool first_reshape_;
vector<int> indices_to_forward_;
};

/**
* @brief Reshapes the input Blob into flat vectors.
*
128 changes: 0 additions & 128 deletions src/caffe/layers/filter_layer.cpp

This file was deleted.

70 changes: 0 additions & 70 deletions src/caffe/layers/filter_layer.cu

This file was deleted.

128 changes: 0 additions & 128 deletions src/caffe/test/test_filter_layer.cpp

This file was deleted.