diff options
author | Ted Yin <[email protected]> | 2015-06-09 17:28:16 +0800 |
---|---|---|
committer | Ted Yin <[email protected]> | 2015-06-09 17:28:16 +0800 |
commit | c20af45d0756d5d3004105da10e51d42a382ad66 (patch) | |
tree | f646f82082aad806676fe42d16b35b5bda1e0b8c /doc/nerv_param.md | |
parent | 480de75f52a4f185546978da023a77e27a8644c3 (diff) | |
parent | 3e07a536a89badff65fc81f56bb19cc69291396e (diff) |
Merge pull request #21 from cloudygoose/master
add doc for layers
Diffstat (limited to 'doc/nerv_param.md')
-rw-r--r-- | doc/nerv_param.md | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/doc/nerv_param.md b/doc/nerv_param.md index 87ea1af..167cb11 100644 --- a/doc/nerv_param.md +++ b/doc/nerv_param.md @@ -3,24 +3,25 @@ Part of the [Nerv](../README.md) toolkit. ##Description## ###Class hierarchy### -There is a base class __Nerv.Param__ defined in `layer/init.lua`. -__Nerv.MatrixParam__ inherits __Nerv.Param__. -__Nerv.LinearTransParam__, __Nerv.BiasParam__ inherits __Nerv.MatrixParam__. -###Class member### -* __Nerv.MatrixParam__ - * __nerv.CuMatrix__ trans - Stores the parameter matrix. +There is a base class __Nerv.Param__ defined in `layer/init.lua`. + +###Class hierarchy and their members### +* __nerv.MatrixParam__ inherits __nerv.Param__ + * `Matrix trans` stores the parameter matrix. +* __nerv.LinearTransParam__ inherits __Nerv.MatrixParam__. +* __Nerv.BiasParam__ inherits __Nerv.MatrixParam__. ##Methods## * __void Param.\_\_init(Param self, string id, table global_conf)__ Constructor of a __Param__, it will set `self.id` to be `id` and `self.gconf` to be `global_conf`. -* __void Param.set_info(table info)__ +* __void Param.set_info(Param self, table info)__ Set `self.info` to be `info`. -* __table Param.get_info()__ +* __table Param.get_info(Param self)__ Returns `self.info`. -* __void Param.read(ChunkData pcdata)__ -This is not implemented in `nerv.Param`. -* __void MatrixParam.read(MatrixParam self, ChunkData pcdata)__ -Read `self.trans` from `pcdata`. -* __void MatrixParam.write(MatrixParam self, ChunkFileHandle pfhandle)__ -Write `self.trans` to `pfhandle`.
\ No newline at end of file +* __void Param.read(Param self, ChunkData pcdata)__ +Abstract method. +In this method, `self` should in turn calls its members to load from `pcdata`. +* __void Param.write(Param self, ChunkFileHandle pfhandle)__ +Abstract method. +Save parameters to file. In this method, `self` should in turn calls its members to save to `pfhandle`. + |