10int main(
int argc,
char **argv)
13 std::cerr <<
"usage: " << argv[0] <<
" path/to/mnist_subset.libsvm" << std::endl;
27 auto encoder = encoder1 >> encoder2;
33 auto decoder = decoder1 >> decoder2;
40 std::size_t iterations = 20000;
46 optimizer.
init(error);
47 std::cout<<
"Optimizing model "<<std::endl;
48 for(std::size_t i = 0; i <= iterations; ++i){
49 optimizer.
step(error);
52 auto const& batch = data.
batch(0).input;
55 std::cout<<i<<
" "<<optimizer.
solution().
value<<
" "<<loss(batch, reconstructed)/batch.size1()<<std::endl;