LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
metadata.hpp
Go to the documentation of this file.
1 // Copyright (c) 2014-2023, Lawrence Livermore National Security, LLC.
3 // Produced at the Lawrence Livermore National Laboratory.
4 // Written by the LBANN Research Team (B. Van Essen, et al.) listed in
5 // the CONTRIBUTORS file. <lbann-dev@llnl.gov>
6 //
7 // LLNL-CODE-697807.
8 // All rights reserved.
9 //
10 // This file is part of LBANN: Livermore Big Artificial Neural Network
11 // Toolkit. For details, see http://software.llnl.gov/LBANN or
12 // https://github.com/LLNL/LBANN.
13 //
14 // Licensed under the Apache License, Version 2.0 (the "Licensee"); you
15 // may not use this file except in compliance with the License. You may
16 // obtain a copy of the License at:
17 //
18 // http://www.apache.org/licenses/LICENSE-2.0
19 //
20 // Unless required by applicable law or agreed to in writing, software
21 // distributed under the License is distributed on an "AS IS" BASIS,
22 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
23 // implied. See the License for the specific language governing
24 // permissions and limitations under the license.
26 
27 #ifndef LBANN_DATA_READER_METADATA_HPP
28 #define LBANN_DATA_READER_METADATA_HPP
29 
30 #include <El.hpp>
31 
33 #include "lbann_config.hpp"
35 
36 #include <string>
37 #include <unordered_map>
38 #include <vector>
39 
40 namespace lbann {
41 
42 // BVE FIXME
43 // NA - Not applicable, used for input layers that don't produce a second output
45 {
47  REGRESSION,
50  INPUT,
51  NA
52 };
53 std::string to_string(data_reader_target_mode m);
55 using TargetModeDimMap =
56  std::unordered_map<data_reader_target_mode, std::vector<El::Int>>;
61 
64  std::unordered_map<data_field_type, std::vector<El::Int>>;
65 
67 {
69  DEPENDENT,
70  NA
71 };
72 std::string to_string(const slice_points_mode m);
75 using SPModeSlicePoints =
76  std::unordered_map<slice_points_mode, std::vector<El::Int>>;
80 
83 {
86 
87 #ifdef LBANN_HAS_DISTCONV
88  // Whether tensor shuffle is required. Some data readers such as
89  // hyperslab-enabled HDF5 data reader does not require shuffling.
90  bool shuffle_required;
91 #endif // LBANN_HAS_DISTCONV
92 };
93 
94 } // namespace lbann
95 
96 #endif // LBANN_DATA_READER_METADATA_HPP
slice_points_mode
Definition: metadata.hpp:66
std::unordered_map< data_field_type, std::vector< El::Int > > data_field_dim_map_type
Map from data_field_type to dimension maps.
Definition: metadata.hpp:64
Create an iterator that goes over a contiguous (unit-step) enum class.
data_reader_target_mode
Definition: metadata.hpp:44
std::unordered_map< data_reader_target_mode, std::vector< El::Int > > TargetModeDimMap
Map from target modes to dimension maps.
Definition: metadata.hpp:56
std::string to_string(El::Device const &d)
std::unordered_map< slice_points_mode, std::vector< El::Int > > SPModeSlicePoints
Map from slice points modes to slice points.
Definition: metadata.hpp:76
TargetModeDimMap data_dims
Definition: metadata.hpp:84
SPModeSlicePoints slice_points
Definition: metadata.hpp:85
slice_points_mode slice_points_mode_from_string(const std::string &m)
Data structure containing metadata from the data readers.
Definition: metadata.hpp:82