Open poweic opened 9 years ago
With limiting the number of dependencies in mind, I think it would be easier to conjure up a graph system ourselves. We don't need fancy-pantsy graph stuff, just simplicity and speed.
I think building our own graph library is okay, but file format would be an issue. We should follow standards such as GML. And I hate to parse file : (
I like the way caffe solved this problem. They store network structures in google protobuf files. Free parser and a compact and clear format. Also, user customizable as hell.
For example:
layer {
name: 'data_layer'
type: SVM_DATA
.. options, file to read from or whatever ...
top: 'data'
}
layer {
name: 'label_layer'
type: SVM_DATA
... options, file to read from or whatever ...
top: 'label'
}
layer {
name: 'sigmoid_kayer'
type: SIGMOID
.. geometry options ..
bottom: 'data'
top: 'layer-1-out'
}
layer {
name: 'error'
type: SOFTMAX_ERROR
bottom: 'layer-1-out'
bottom: 'label'
.. options ..
}
In
class NNet
, I usestd::vector<FeatureTransform*>
to store all the feature transformations. For Recurrent Neural Network (RNN) or other user-defined NN structures,std::vector
is not enough. A graph container and file format for graphs are needed.Here are some graph libraries I found on Stackoverflow:
Also, I'm considering to split the big single model file into small ones and save them in a directory. Something like this:
We can also provide a simple Web App to edit/draw
nnet.topo.xml
.