You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/11/21 14:53:58 UTC

[jira] [Commented] (SINGA-264) Extend the FeedForwardNet to accept multiple inputs

    [ https://issues.apache.org/jira/browse/SINGA-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15683774#comment-15683774 ] 

ASF subversion and git services commented on SINGA-264:
-------------------------------------------------------

Commit f35d217c9edf57fe193efcae8ab6bb16ec2dcf5a in incubator-singa's branch refs/heads/master from wang wei
[ https://git-wip-us.apache.org/repos/asf?p=incubator-singa.git;h=f35d217 ]

SINGA-264 Extend the FeedForwardNet to accept multiple inputs

Extend FeedForwardNet to support multiple input tensors and output tensors.
The input variable x, of train(x, y), forward(x), predict(x), evaluate(x)
could be a single tensor or a dictionary: layer name -> a single tensor or tensor list.
The key is the name of the layer to feed the input data.

The output of out=forward(x, output), would be a single tensor or a dictionary:
layer name -> a single tensor or a tensor list. The key is the name of
the layer to get the output values, e.g, the net has multiple layers
whose outgoing degree is 0. By configuring the argument
'output' as a list of layer names, we can get values of those layers in
'out'.

Passed unittests.


> Extend the FeedForwardNet to accept multiple inputs
> ---------------------------------------------------
>
>                 Key: SINGA-264
>                 URL: https://issues.apache.org/jira/browse/SINGA-264
>             Project: Singa
>          Issue Type: Improvement
>            Reporter: wangwei
>
> The current implementation of the feed-forward net assumes that the input data comes from a single source, which does not work for nets with multiple input sources.
> To enable multiple data sources and to be compatible with existing code, we can update the code by adding a check for the x field of `def train(x, y)`
> {code}
> if type(x) is dict:  # multi sources
>     # feed the value x[k] to the input layer with name k
> else:  # single source
>    feed x to the first layer, i.e. the input layer
> {code}
> Similarly we can also process multiple output (label) tensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)