-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved some serialization from .h to .cc
- Loading branch information
Showing
20 changed files
with
328 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ set(cnn_library_SRCS | |
shadow-params.cc | ||
tensor.cc | ||
training.cc | ||
weight-decay.cc | ||
) | ||
|
||
# Headers: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#include "cnn/cnn.h" | ||
|
||
#include "cnn/exec.h" | ||
#include "cnn/nodes.h" | ||
#include "cnn/param-nodes.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef CNN_IO_MACROS__ | ||
#define CNN_IO_MACROS__ | ||
|
||
#include <boost/archive/text_iarchive.hpp> | ||
#include <boost/archive/text_oarchive.hpp> | ||
#include <boost/archive/binary_iarchive.hpp> | ||
#include <boost/archive/binary_oarchive.hpp> | ||
|
||
#define CNN_SERIALIZE_IMPL(MyClass) \ | ||
template void MyClass::serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive &ar, const unsigned int); \ | ||
template void MyClass::serialize<boost::archive::text_iarchive>(boost::archive::text_iarchive &ar, const unsigned int); \ | ||
template void MyClass::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive &ar, const unsigned int); \ | ||
template void MyClass::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive &ar, const unsigned int); | ||
|
||
#define CNN_SAVELOAD_IMPL(MyClass) \ | ||
template void MyClass::save<boost::archive::text_oarchive>(boost::archive::text_oarchive &ar, const unsigned int) const; \ | ||
template void MyClass::load<boost::archive::text_iarchive>(boost::archive::text_iarchive &ar, const unsigned int); \ | ||
template void MyClass::save<boost::archive::binary_oarchive>(boost::archive::binary_oarchive &ar, const unsigned int) const; \ | ||
template void MyClass::load<boost::archive::binary_iarchive>(boost::archive::binary_iarchive &ar, const unsigned int); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.