BVLC/caffe — pull request #1414 by netheril96 (2014-11-07 10:04:59+00:00)
Title: Indirection layer

This is an new layer implemented, as mentioned in #523. The `IndirectionLayer` maps each single integer label into an arbitrary blob. The mapping is stored in the file specified by the `source` parameter.

In a lot of cases, more than a single integer label for each image is needed. It may be a group of independent labels, or linear array/matrix, or a combination. The current workarounds is to create multiple `DataLayer` and `ImageDataLayer`, each outputting a data array. The problem with this approach is

1. It is not natural. The additional labels must be converted to image format that is only a dummy container of numbers, combined with dummy labels to create a `DataLayer` or `ImageDataLayer` that sometimes is used for providing neither "data" nor "images".
2. It is not flexible. The order of different set of data must be manually synchronized, and it disables the use of shuffling in a lot of cases.

The new layer solves the above problems.