singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wangwei (JIRA)" <>
Subject [jira] [Created] (SINGA-198) Change Layer::Setup API to include input Tensor shapes
Date Thu, 16 Jun 2016 08:56:05 GMT
wangwei created SINGA-198:

             Summary: Change Layer::Setup API to include input Tensor shapes
                 Key: SINGA-198
             Project: Singa
          Issue Type: Improvement
            Reporter: wangwei

For some layers, they require input Tensor shapes to setup their own data structures, e.g.,
Previously, we get those shape data from layer configuration (i.e., the protobuf object).
This ticket is going to pass the input Tensor shapes as an argument to the Layer::Setup function.
There are two cases:
1. there is a single input Tensor, then shape is a vector<size_t>
2. there are multiple input Tensor, then shape is vector<vector<size_t>>

During setup, we may not know the batchsize, hence we use the shapes  for one sample/example/instance.
In other words, batchsize is not included in the shapes. E.g., the shape for convoltuion::Setup
has three values for channel, height and width, while batchsize is not included.

Corresponding, we need a get_output_shapes function, which returns the shape of the features
generated by this layer. It should be called after calling Layer::Setup.

This message was sent by Atlassian JIRA

View raw message