singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (SINGA-61) Support user defined classes
Date Wed, 19 Aug 2015 09:00:51 GMT


ASF subversion and git services commented on SINGA-61:

Commit 97141e2e0e81045a6bbedee14d88e98a4ad6c136 in incubator-singa's branch refs/heads/master
from Wei Wang
[;h=97141e2 ]

SINGA-61 Support user defined classes

To support user defined classes, we need to set a type field for each class in the configuration.
E.g., the LayerProto has a type field. But this type field can only be set to built-in layer
This commit adds a user_type field for user defined layers. E.g.,

    LayerProto {
      optional string user_type = 10;

A helper function Layer::Create(const LayerProto&) is added to create a Layer object based
on configured type.

Similar updates are applied for other classes, namely, Param, Worker, Updater.

> Support user defined classes
> ----------------------------
>                 Key: SINGA-61
>                 URL:
>             Project: Singa
>          Issue Type: New Feature
>            Reporter: wangwei
> Many modules in SINGA are extensible. To make it easy for users to implement their own
classes, SINGA separates user code and SINGA code. Users just compile their code and link
it with One problem in this design is on the configuration. Take the Layer configuration
as an example。
> {code}
> enum LayerType{
>   kFoo = 2;
>   ...
> }
> message LayerProto {
>   required LayerType type = 2;
> }
> {code}
> The types of all built-in layers are defined in *enum LayerType*. However, for user defined
Layer sub-classes, users cannot add them into *LayerType* without recompiling SINGA code (google
protocol buffer does not support extension of enum types).
> To solve this problem, SINGA needs one field for user defined Layer sub-classes.
> {code}
> message LayerProto {
>   optional LayerType type =2;
>   optional string user_type = 3;
> }
> {code}
> In user's job configuration file, he either sets *type* ( for built-in layer) or set
*user_type* (for user defined layer).
> It is similar for other classes, e.g., Worker, Updater, etc.

This message was sent by Atlassian JIRA

View raw message