This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mlpack/methods/ann/ffn.hpp> | |
#include <mlpack/methods/ann/layer/layer.hpp> | |
using namespace mlpack::ann; | |
/* This layer accepts the output of the positional encoding or the output | |
* of the previous encoder block as the input. | |
* The output is one key/value matrix. | |
*/ | |
Sequential<>* CreateEncoderBlock() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <random> | |
#include <chrono> | |
using namespace std; | |
using namespace chrono; | |
vector<pair<size_t, double>> TestParallel(const vector<size_t>& sizes) { | |
random_device rd; |