-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
427 additions
and
329 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-40 Bytes
(100%)
build/CMakeFiles/sita.dir/src/sita/dataprovider/dataprovider.cpp.o
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/CMakeFiles/sita.dir/src/sita/dataprovider/dataset_util/mnist.cpp.o
Binary file not shown.
Binary file modified
BIN
+2.37 KB
(100%)
build/CMakeFiles/sita.dir/src/sita/dataprovider/mnist_dataprovider.cpp.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/CMakeFiles/sita.dir/src/sita/dlflow/operators/add_op.cpp.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Created by unsky on 09/08/18. | ||
// | ||
|
||
#ifndef SITA_RNG_H | ||
#define SITA_RNG_H | ||
|
||
#include <algorithm> | ||
#include <iterator> | ||
|
||
#include "boost/random/mersenne_twister.hpp" | ||
#include "boost/random/uniform_int.hpp" | ||
|
||
namespace sita{ | ||
|
||
typedef boost::mt19937 rng_t; | ||
|
||
inline rng_t* caffe_rng() { | ||
return static_cast<rng_t*>(Caffe::rng_stream().generator()); | ||
} | ||
|
||
// Fisher–Yates algorithm | ||
template <class RandomAccessIterator, class RandomGenerator> | ||
inline void shuffle(RandomAccessIterator begin, RandomAccessIterator end, | ||
RandomGenerator* gen) { | ||
typedef typename std::iterator_traits<RandomAccessIterator>::difference_type | ||
difference_type; | ||
typedef typename boost::uniform_int<difference_type> dist_type; | ||
|
||
difference_type length = std::distance(begin, end); | ||
if (length <= 0) return; | ||
|
||
for (difference_type i = length - 1; i > 0; --i) { | ||
dist_type dist(0, i); | ||
std::iter_swap(begin + i, begin + dist(*gen)); | ||
} | ||
} | ||
|
||
template <class RandomAccessIterator> | ||
inline void shuffle(RandomAccessIterator begin, RandomAccessIterator end) { | ||
shuffle(begin, end, caffe_rng()); | ||
} | ||
} | ||
#endif //SITA_RNG_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by unsky on 09/08/18. | ||
// | ||
|
||
#ifndef SITA_STUFF_STUFF_H | ||
#define SITA_STUFF_STUFF_H | ||
namespace sita { | ||
|
||
class Stuff { | ||
public: | ||
|
||
Stuff() {} | ||
~Stuff() {} | ||
|
||
virtual void inferance() {} | ||
|
||
virtual void backward() {} | ||
|
||
private: | ||
DISABLE_COPY_AND_ASSIGN(Stuff); | ||
}; | ||
} | ||
#endif //SITA_STUFF_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
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