LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::callback::autoencoder_strategy Class Reference

Subclass of image_output_strategy to dump autoencoder images. More...

#include <summarize_images.hpp>

Inheritance diagram for lbann::callback::autoencoder_strategy:
[legend]
Collaboration diagram for lbann::callback::autoencoder_strategy:
[legend]

Public Member Functions

 autoencoder_strategy (std::string const &input_layer_name, size_t num_images=10)
 Constructor. More...
 
std::vector< std::pair< size_t, El::Int > > get_image_indices (model const &m) const final
 Get vector containing indices of images to be dumped. More...
 
std::string get_tag (std::string const &layer_name, El::Int index, El::Int epoch) const final
 Construct tag for image. More...
 
void write_strategy_proto (lbann_data::Callback_CallbackSummarizeImages &msg) const final
 Write strategy specific data to prototext. More...
 
- Public Member Functions inherited from lbann::callback::image_output_strategy
virtual ~image_output_strategy ()=default
 

Private Attributes

std::string m_input_layer_name
 Name of input layer. More...
 
size_t m_num_images
 Number of images to be tracked. More...
 
std::unordered_set< El::Int > m_tracked_images
 Sample indices of images to track. More...
 
std::unordered_map< model const *, std::vector< size_t > > m_shuffled_indices
 A map from models to shuffled indices. More...
 

Detailed Description

Subclass of image_output_strategy to dump autoencoder images.

Dump images to event files based on strategy

Definition at line 133 of file summarize_images.hpp.

Constructor & Destructor Documentation

◆ autoencoder_strategy()

lbann::callback::autoencoder_strategy::autoencoder_strategy ( std::string const &  input_layer_name,
size_t  num_images = 10 
)
inline

Constructor.

Parameters
input_layer_nameThe input layer.
num_imagesThe number of images to dump.

Definition at line 141 of file summarize_images.hpp.

Member Function Documentation

◆ get_image_indices()

std::vector<std::pair<size_t, El::Int> > lbann::callback::autoencoder_strategy::get_image_indices ( model const &  m) const
finalvirtual

Get vector containing indices of images to be dumped.

Returns
std::vector<int> Vector with indices of images to dump.

Implements lbann::callback::image_output_strategy.

◆ get_tag()

std::string lbann::callback::autoencoder_strategy::get_tag ( std::string const &  layer_name,
El::Int  index,
El::Int  epoch 
) const
finalvirtual

Construct tag for image.

Implements lbann::callback::image_output_strategy.

◆ write_strategy_proto()

void lbann::callback::autoencoder_strategy::write_strategy_proto ( lbann_data::Callback_CallbackSummarizeImages &  msg) const
finalvirtual

Write strategy specific data to prototext.

Implements lbann::callback::image_output_strategy.

Member Data Documentation

◆ m_input_layer_name

std::string lbann::callback::autoencoder_strategy::m_input_layer_name
private

Name of input layer.

Definition at line 163 of file summarize_images.hpp.

◆ m_num_images

size_t lbann::callback::autoencoder_strategy::m_num_images
private

Number of images to be tracked.

Definition at line 166 of file summarize_images.hpp.

◆ m_shuffled_indices

std::unordered_map<model const*, std::vector<size_t> > lbann::callback::autoencoder_strategy::m_shuffled_indices
mutableprivate

A map from models to shuffled indices.

Definition at line 173 of file summarize_images.hpp.

◆ m_tracked_images

std::unordered_set<El::Int> lbann::callback::autoencoder_strategy::m_tracked_images
mutableprivate

Sample indices of images to track.

Definition at line 169 of file summarize_images.hpp.


The documentation for this class was generated from the following file: