| 30 | #include <stdio.h> |
| 31 | |
| 32 | void construct_opts(int argc, char **argv) { |
| 33 | auto& arg_parser = lbann::global_argument_parser(); |
| 34 | arg_parser.add_option("samples", |
| 35 | {"-n"}, |
| 36 | "Number of samples to run inference on", |
| 37 | 128); |
| 38 | arg_parser.add_option("channels", |
| 39 | {"-c"}, |
| 40 | "Number of image channels in sample", |
| 41 | 1); |
| 42 | arg_parser.add_option("height", |
| 43 | {"-h"}, |
| 44 | "Height of image in sample", |
| 45 | 28); |
| 46 | arg_parser.add_option("width", |
| 47 | {"-w"}, |
| 48 | "Width of image in sample", |
| 49 | 28); |
| 50 | arg_parser.add_option("labels", |
| 51 | {"-l"}, |
| 52 | "Number of labels in dataset", |
| 53 | 10); |
| 54 | arg_parser.add_option("minibatchsize", |
| 55 | {"-mbs"}, |
| 56 | "Number of samples in a mini-batch", |
| 57 | 16); |
| 58 | arg_parser.add_required_argument<std::string> |
| 59 | ("model", |
| 60 | "Directory containing checkpointed model"); |
| 61 | arg_parser.parse(argc, argv); |
| 62 | } |
| 63 | |
| 64 | El::DistMatrix<float, El::STAR, El::STAR, El::ELEMENT, El::Device::CPU> |
| 65 | random_samples(El::Grid const& g, int n, int c, int h, int w) { |
no test coverage detected