MCPcopy Create free account
hub / github.com/LBANN/lbann / construct_opts

Function construct_opts

core-driver/main.cpp:32–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <stdio.h>
31
32void 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
64El::DistMatrix<float, El::STAR, El::STAR, El::ELEMENT, El::Device::CPU>
65random_samples(El::Grid const& g, int n, int c, int h, int w) {

Callers 1

mainFunction · 0.85

Calls 2

parseMethod · 0.80
add_optionMethod · 0.45

Tested by

no test coverage detected