[mlpack-git] master: Handle the identity connection. (222a7e1)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jul 1 16:29:41 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/cf08dc96724f70468c8e31ced1761ed000b55b18...222a7e191f8a7925a4870ce1acbd68589899dfde
>---------------------------------------------------------------
commit 222a7e191f8a7925a4870ce1acbd68589899dfde
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Wed Jul 1 22:29:30 2015 +0200
Handle the identity connection.
>---------------------------------------------------------------
222a7e191f8a7925a4870ce1acbd68589899dfde
src/mlpack/methods/ann/cnn.hpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/ann/cnn.hpp b/src/mlpack/methods/ann/cnn.hpp
index 03dea65..bcd08a8 100644
--- a/src/mlpack/methods/ann/cnn.hpp
+++ b/src/mlpack/methods/ann/cnn.hpp
@@ -365,7 +365,9 @@ class CNN
Gradients(std::tuple<Tp...>& t)
{
if (!ConnectionTraits<typename std::remove_reference<decltype(
- std::get<I>(t))>::type>::IsPoolingConnection)
+ std::get<I>(t))>::type>::IsPoolingConnection &&
+ !ConnectionTraits<typename std::remove_reference<decltype(
+ std::get<I>(t))>::type>::IsIdentityConnection)
{
std::get<I>(t).Optimzer().Update();
}
@@ -410,7 +412,9 @@ class CNN
Apply(std::tuple<Tp...>& t)
{
if (!ConnectionTraits<typename std::remove_reference<decltype(
- std::get<I>(t))>::type>::IsPoolingConnection)
+ std::get<I>(t))>::type>::IsPoolingConnection &&
+ !ConnectionTraits<typename std::remove_reference<decltype(
+ std::get<I>(t))>::type>::IsIdentityConnection)
{
std::get<I>(t).Optimzer().Optimize();
std::get<I>(t).Optimzer().Reset();
More information about the mlpack-git
mailing list