Dropout Layer
Implemented rng::uniform and rng::binomial for single values, vectors and matrices. implemeted dropout layers and tested it. Also fixed the validation code. Before it used y one place, now it uses y_test as it should.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "detail/uniform_serial.h"
|
||||
|
||||
namespace rng {
|
||||
|
||||
template <typename T>
|
||||
T uniform(const T low, const T high) {
|
||||
return rng::detail::uniform_serial(low, high);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
utils::Vector<T> uniform(const uint64_t size, const T low, const T high) {
|
||||
return rng::detail::uniform_serial(size, low, high);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
utils::Matrix<T> uniform(const uint64_t rows, const uint64_t cols, const T low, const T high) {
|
||||
return rng::detail::uniform_serial(rows, cols, low, high);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user