aboutsummaryrefslogtreecommitdiff
path: root/doc/nerv_param.md
blob: 167cb111f66ef79f3c8edf560dd656318048e9c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#The Nerv Parameter Package#
Part of the [Nerv](../README.md) toolkit.

##Description##
###Class hierarchy###
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(Param self, table info)__  
Set `self.info` to be `info`.
* __table Param.get_info(Param self)__  
Returns `self.info`.
* __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`.