Skip to content

Commit

Permalink
un-verbose ut13 again
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Nov 11, 2019
1 parent 45f91af commit fa15af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/qnets/templ/TemplNet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ class TemplNet
}

public:

explicit constexpr TemplNet(DynamicDFlags init_dflags = DynamicDFlags{DCONF}):
_out_begins(tupl::make_fcont<std::array<const ValueT *, nlayer>>(_layers, [](const auto &layer) { return &layer.out().front(); })),
_beta_begins(tupl::make_fcont<std::array<ValueT *, nlayer>>(_layers, [](auto &layer) { return &layer.beta.front(); })),
Expand Down
8 changes: 4 additions & 4 deletions test/ut13/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ template <class TNet>
void checkIdentity(const FeedForwardNeuralNetwork &ffnn, const TNet &tmpl, double TINY)
{
for (int i = 0; i < ffnn.getNOutput(); ++i) {
std::cout << "f_" << i << ": poly " << ffnn.getOutput(i) << " tmpl " << tmpl.getOutput(i) << std::endl;
//std::cout << "f_" << i << ": poly " << ffnn.getOutput(i) << " tmpl " << tmpl.getOutput(i) << std::endl;
assert(ffnn.getOutput(i) == tmpl.getOutput(i));
for (int j = 0; j < ffnn.getNInput(); ++j) {
std::cout << "d1_" << i << "_" << j << ": poly " << ffnn.getFirstDerivative(i, j) << " tmpl " << tmpl.getD1(i, j) << std::endl;
std::cout << "d2_" << i << "_" << j << ": poly " << ffnn.getSecondDerivative(i, j) << " tmpl " << tmpl.getD2(i, j) << std::endl;
//std::cout << "d1_" << i << "_" << j << ": poly " << ffnn.getFirstDerivative(i, j) << " tmpl " << tmpl.getD1(i, j) << std::endl;
//std::cout << "d2_" << i << "_" << j << ": poly " << ffnn.getSecondDerivative(i, j) << " tmpl " << tmpl.getD2(i, j) << std::endl;
assert(fabs(ffnn.getFirstDerivative(i, j) - tmpl.getD1(i, j)) < TINY);
assert(fabs(ffnn.getSecondDerivative(i, j) - tmpl.getD2(i, j)) < TINY);
}
for (int j = 0; j < ffnn.getNBeta(); ++j) {
std::cout << "vd1_" << i << "_" << j << ": poly " << ffnn.getVariationalFirstDerivative(i, j) << " tmpl " << tmpl.getVD1(i, j) << std::endl;
//std::cout << "vd1_" << i << "_" << j << ": poly " << ffnn.getVariationalFirstDerivative(i, j) << " tmpl " << tmpl.getVD1(i, j) << std::endl;
assert(fabs(ffnn.getVariationalFirstDerivative(i, j) - tmpl.getVD1(i, j)) < TINY);
}
}
Expand Down

0 comments on commit fa15af4

Please sign in to comment.