new function to support LSTM Unit
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <NeuralNetwork/BasisFunction/Linear.h>
|
||||
#include <NeuralNetwork/BasisFunction/Product.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
@@ -33,6 +34,14 @@ int main() {
|
||||
assert(220.0==l.computeStreaming(w,w));
|
||||
assert(220.0==l.compute(w,w));
|
||||
}
|
||||
{
|
||||
NeuralNetwork::BasisFunction::Product l;
|
||||
std::vector<float> w({0,0.501,1});
|
||||
std::vector<float> i({0,0.2,0.3});
|
||||
|
||||
assert(l(w,i) > 0.05999);
|
||||
assert(l(w,i) < 0.06001);
|
||||
}
|
||||
/*
|
||||
std::vector<float> w;
|
||||
std::vector<float> i;
|
||||
@@ -61,6 +70,5 @@ int main() {
|
||||
std::cout << "SSE :" << diff.count() << " s\n";
|
||||
}
|
||||
*/
|
||||
std::cout <<"OK" << std::endl;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user