You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by "Lee Chonho (JIRA)" <ji...@apache.org> on 2015/09/26 17:24:04 UTC

[jira] [Commented] (SINGA-61) Support user defined classes

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

Lee Chonho commented on SINGA-61:
---------------------------------

do we need or Is there a function to get user_type of string similar to int layer->type(), which returns integer ?



> Support user defined classes
> ----------------------------
>
>                 Key: SINGA-61
>                 URL: https://issues.apache.org/jira/browse/SINGA-61
>             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 libsinga.so. 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
(v6.3.4#6332)