master: fq-dev: yz-branch: mc-dev:
- Add wrapper for each layer. For example: FullyConnectedLayer has a wrapper
FullyConnectedLayer FullyConnectedLayer::fc(Net* net, name, lefts, right[, layer specific params])
. You should callLayer::add_to_net()
in the wrapper, so you need some extra arguments. Please refer tolayer.h
. Then, you should check the return value ofLayer::add_to_net()
to make sure everything was ok, if any error occurred the program may abort (useexit(errno)
). - Layer Class: Call base class Layer's constructor function with layer's name
- Must provide
get_outputs_dimensions()
. Each blob has 4 dimensions [batchsize, x, y, z]. If exist more than one blobs, concatenate them in one integer array. - Error Handling: If you need to tell caller that something went wrong, you can return a error code. You can define your own error code in
errors.h
(pick next available number) and add its human readable error message inerrors.cpp
. - Encounter some open problems? You can label things to be done by adding a comment begin with
//TODO:
(case sensitive) so that all unsolved problem can be tracked by some IDEs. - Do no need to modify
CMakeLists.txt
to track new files. I have already modified it to enable cmake to automatically search all *.cpp files and include them for compiling.
3/8/2019:
- Maintain private(or public) members for layer specific parameters, including the W and delta_W, by yourself. W should be updated by delta_W at each batch.
- Do not compile main.cpp for debuging. It is not UNIT test but a system test.
- If you would access private members in test, please refer
reqnet.h
andreqnet_test.cpp
. - How to compute:
As shown in layer.h, necessary data are already stored in the base class. So no more arguments forinfer()
andbp()
.infer()
now isinfer(vector<Blob*> lefts, vector<Blob*> rights)
so that you can retrieve data from arguments directly. Same change tobp()
.
- Simplified network construction: A blob can only be modified AND used by one layer. Only input layer and loss layer (the final one) can have multiple outputs/inputs and the order of blobs must be pre-defined manually. (e.g. input layer produces two blobs "data" and "label", not "label" and "data").
- No check for repeated names of blobs and layers.
- Cannot control the start point and end point. You can only run the whole net forward or/and backward.
- For other unstated limitations, please see the TODOs in source code.
- g++ 4.9+
- CMake 2.8.11+
- CUDA
git clone [url]
cd [root_dir]
git submodule init
git submodule update
cd minicaffe/build
cmake .. # Without test
cmake --build . # Then find target library in minicaffe/build/
git clone [url]
cd [root_dir]
git submodule init
git submodule update
cd minicaffe/build
cmake .. -DTEST_ENABLED=ON # This option will enable GoogleTest and our test case
cmake --build . # Then find target library in minicaffe/build/
and xxx_test in minicaffe/build/test
git clone [url]
cd [root_dir]
git submodule init
git submodule update
cd build
cmake ..
cmake --build . # Then find the final executable in [root dir]/build/
git clone [url]
cd [root_dir]
git submodule init
git submodule update
cd build
export CXX=/act/gcc-5.1.0/bin/g++
export CC=/act/gcc-5.1.0/bin/gcc
cmake -D CMAKE_C_COMPILER=gcc CMAKE_CXX_COMPILER=g++ /curr_absolute_build_path/
cmake .. -DTEST_ENABLED=ON
cmake --build . # Then find the final executable in [root dir]/build/
git clone [url]
cd [root_dir]
git submodule init
git submodule update
cd build
export CXX=/act/gcc-5.1.0/bin/g++
export CC=/act/gcc-5.1.0/bin/gcc
cmake -D CMAKE_C_COMPILER=gcc CMAKE_CXX_COMPILER=g++ /curr_absolute_build_path/
cmake .. -DTEST_ENABLED=ON
cmake --build . # Then find the final executable in [root dir]/build/
- Added "yz-branch" to Travis CI
- Modified CMakeLists to support GTest with private members.
- Added new definition of Generator.
- New
SeqNet
.Net
is obsoleted. With test. - Updated
Layer
's interface (i.e.infer()
). - Minor changes.