Commit 5e337fa1 authored by mutsuki's avatar mutsuki

Add inline

parent 3e72e089
......@@ -6,13 +6,12 @@
#include <tuple>
#include <stdexcept>
namespace{
namespace mtk{
constexpr std::size_t CIFAR_10_DIM = 32;
using label_t = int;
using image_t = std::vector<unsigned int>;
using sample_t = std::tuple<image_t, label_t>;
std::vector<sample_t> load_cifar_10(const std::string& filename) {
inline std::vector<sample_t> load_cifar_10(const std::string& filename) {
std::ifstream ifs(filename);
if(!ifs){
throw std::runtime_error("No such file : " + filename);
......@@ -55,6 +54,5 @@ std::vector<sample_t> load_cifar_10(const std::string& filename) {
return samples;
}
}
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment