C++ API Reference

struct

Public Members

PyObject_HEAD PyObject* aeon_DataLoader::ndata
PyObject *aeon_DataLoader::batch_size
PyObject *aeon_DataLoader::axes_info
PyObject *aeon_DataLoader::config
PyObject *aeon_DataLoader::session_id
loader *aeon_DataLoader::m_loader
uint32_t aeon_DataLoader::m_i
bool aeon_DataLoader::m_first_iteration
struct

Public Members

PyObject *aeon_state::error
class
#include <etl_localization_rcnn.hpp>

Public Static Functions

vector<box> localization::rcnn::anchor::generate(const localization::rcnn::config &cfg)
vector<int> localization::rcnn::anchor::inside_image_bounds(int width, int height, const std::vector<box> &all_anchors)

Private Functions

nervana::localization::rcnn::anchor::anchor()

Private Static Functions

vector<box> localization::rcnn::anchor::generate_anchors(size_t base_size, const std::vector<float> &ratios, const std::vector<float> &scales)
vector<box> localization::rcnn::anchor::ratio_enum(const box &anchor, const std::vector<float> &ratios)
vector<box> localization::rcnn::anchor::mkanchors(const std::vector<float> &ws, const std::vector<float> &hs, float x_ctr, float y_ctr)
vector<box> localization::rcnn::anchor::scale_enum(const box &anchor, const std::vector<float> &scales)
template <typename INPUT, typename OUTPUT>
class
#include <async_manager.hpp>

Inherits from nervana::async_manager_source< OUTPUT >, nervana::async_manager_info

Public Functions

nervana::async_manager::async_manager(std::shared_ptr<async_manager_source<INPUT>> source, const std::string &name)
virtual nervana::async_manager::~async_manager()
OUTPUT *nervana::async_manager::next()
virtual OUTPUT *nervana::async_manager::filler()
= 0
virtual void nervana::async_manager::reset()
virtual void nervana::async_manager::initialize()
void nervana::async_manager::finalize()
virtual void nervana::async_manager::suspend_output()
async_state nervana::async_manager::get_state() const
const std::string &nervana::async_manager::get_name() const

Protected Types

typedef

Protected Functions

nervana::async_manager::async_manager(const async_manager&)
void nervana::async_manager::run_filler()
OUTPUT *nervana::async_manager::get_pending_buffer()

Protected Attributes

template<>
OUTPUT nervana::async_manager<INPUT, OUTPUT>::m_containers[2]
OUTPUT *nervana::async_manager::m_pending_buffer
std::shared_ptr<async_manager_source<INPUT>> nervana::async_manager::m_source
async_state nervana::async_manager::m_state
std::string nervana::async_manager::m_name
BlockingQueue<inner_buffer_t> nervana::async_manager::m_bq_input
BlockingQueue<inner_buffer_t> nervana::async_manager::m_bq_output
std::shared_ptr<std::thread> nervana::async_manager::fill_thread
bool m_bfirst_next nervana::async_manager::true
volatile bool nervana::async_manager::m_active_thread
std::mutex nervana::async_manager::m_mutex
class
#include <async_manager.hpp>

Subclassed by nervana::async_manager< encoded_record_list, encoded_record_list >, nervana::async_manager< encoded_record_list, fixed_buffer_map >, nervana::async_manager< fixed_buffer_map, fixed_buffer_map >, nervana::async_manager< std::vector< std::vector< std::string > >, encoded_record_list >, nervana::async_manager< INPUT, OUTPUT >

Public Functions

virtual nervana::async_manager_info::~async_manager_info()
virtual async_state nervana::async_manager_info::get_state() const
= 0
virtual const std::string &nervana::async_manager_info::get_name() const
= 0
template <typename OUTPUT>
class
#include <async_manager.hpp>

Subclassed by nervana::async_manager< INPUT, OUTPUT >

Public Functions

nervana::async_manager_source::async_manager_source()
virtual nervana::async_manager_source::~async_manager_source()
virtual OUTPUT *nervana::async_manager_source::next()
= 0
virtual size_t nervana::async_manager_source::record_count() const
= 0
virtual size_t nervana::async_manager_source::elements_per_record() const
= 0
virtual void nervana::async_manager_source::reset()
= 0
virtual void nervana::async_manager_source::suspend_output()
nervana::async_manager_source::async_manager_source(const async_manager_source&)
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::audio::audio(nlohmann::json js, nlohmann::json aug)
virtual nervana::provider::audio::~audio()
void provider::audio::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation &aug) const

Private Members

nervana::audio::config nervana::provider::audio::m_config
nervana::audio::extractor nervana::provider::audio::m_extractor
nervana::audio::transformer nervana::provider::audio::m_transformer
nervana::audio::loader nervana::provider::audio::m_loader
augment::audio::param_factory nervana::provider::audio::m_augmentation_factory
const std::string nervana::provider::audio::m_buffer_name
const std::string nervana::provider::audio::m_length_name
class
#include <provider.hpp>

Public Members

std::shared_ptr<augment::image::params> nervana::augmentation::m_image_augmentations
std::shared_ptr<augment::audio::params> nervana::augmentation::m_audio_augmentations
struct
#include <avi.hpp>

Public Members

uint32_t nervana::AviIndex::ckid
uint32_t nervana::AviIndex::dwFlags
uint32_t nervana::AviIndex::dwChunkOffset
uint32_t nervana::AviIndex::dwChunkLength
struct
#include <avi.hpp>

Public Members

uint32_t nervana::AviMainHeader::dwMicroSecPerFrame
uint32_t nervana::AviMainHeader::dwMaxBytesPerSec
uint32_t nervana::AviMainHeader::dwReserved1
uint32_t nervana::AviMainHeader::dwFlags
uint32_t nervana::AviMainHeader::dwTotalFrames
uint32_t nervana::AviMainHeader::dwInitialFrames
uint32_t nervana::AviMainHeader::dwStreams
uint32_t nervana::AviMainHeader::dwSuggestedBufferSize
uint32_t nervana::AviMainHeader::dwWidth
uint32_t nervana::AviMainHeader::dwHeight
uint32_t nervana::AviMainHeader::dwReserved[4]
class
#include <avi.hpp>

Public Functions

nervana::AviMjpegStream::AviMjpegStream()
bool nervana::AviMjpegStream::parseAvi(std::istream &in_str)
bool nervana::AviMjpegStream::parseAvi(std::istream &in_str, frame_list &in_frame_list)
size_t nervana::AviMjpegStream::getFramesCount()
frame_list &nervana::AviMjpegStream::getFrames()
uint32_t nervana::AviMjpegStream::getWidth()
uint32_t nervana::AviMjpegStream::getHeight()
double nervana::AviMjpegStream::getFps()

Protected Functions

bool nervana::AviMjpegStream::parseAviWithFrameList(std::istream &in_str, frame_list &in_frame_list)
void nervana::AviMjpegStream::skipJunk(RiffChunk &chunk, std::istream &in_str)
void nervana::AviMjpegStream::skipJunk(RiffList &list, std::istream &in_str)
bool nervana::AviMjpegStream::parseHdrlList(std::istream &in_str)
bool nervana::AviMjpegStream::parseIndex(std::istream &in_str, uint32_t index_size, frame_list &in_frame_list)
bool nervana::AviMjpegStream::parseMovi(std::istream &in_str, frame_list &in_frame_list)
bool nervana::AviMjpegStream::parseStrl(std::istream &in_str, uint8_t stream_id)
bool nervana::AviMjpegStream::parseInfo(std::istream &in_str)
void nervana::AviMjpegStream::printError(std::istream &in_str, RiffList &list, uint32_t expected_fourcc)
void nervana::AviMjpegStream::printError(std::istream &in_str, RiffChunk &chunk, uint32_t expected_fourcc)

Protected Attributes

uint32_t nervana::AviMjpegStream::m_stream_id
uint64_t nervana::AviMjpegStream::m_movi_start
uint64_t nervana::AviMjpegStream::m_movi_end
frame_list nervana::AviMjpegStream::m_frame_list
uint32_t nervana::AviMjpegStream::m_width
uint32_t nervana::AviMjpegStream::m_height
double nervana::AviMjpegStream::m_fps
bool nervana::AviMjpegStream::m_is_indx_present
struct
#include <avi.hpp>

Public Members

uint32_t nervana::AviStreamHeader::fccType
uint32_t nervana::AviStreamHeader::fccHandler
uint32_t nervana::AviStreamHeader::dwFlags
uint32_t nervana::AviStreamHeader::dwPriority
uint32_t nervana::AviStreamHeader::dwInitialFrames
uint32_t nervana::AviStreamHeader::dwScale
uint32_t nervana::AviStreamHeader::dwRate
uint32_t nervana::AviStreamHeader::dwStart
uint32_t nervana::AviStreamHeader::dwLength
uint32_t nervana::AviStreamHeader::dwSuggestedBufferSize
uint32_t nervana::AviStreamHeader::dwQuality
uint32_t nervana::AviStreamHeader::dwSampleSize
int16_t nervana::AviStreamHeader::left
int16_t nervana::AviStreamHeader::top
int16_t nervana::AviStreamHeader::right
int16_t nervana::AviStreamHeader::bottom
struct nervana::AviStreamHeader::@0 nervana::AviStreamHeader::rcFrame
class
#include <base64.hpp>

Public Static Functions

static std::vector<char> nervana::base64::encode(const std::vector<char> &data)
vector<char> nervana::base64::encode(const char *data, size_t size)
static std::vector<char> nervana::base64::decode(const std::vector<char> &data)
vector<char> nervana::base64::decode(const char *data, size_t size)
string nervana::base64::gen_decode_table()

Private Static Attributes

const uint8_t nervana::base64::character_codes
const uint8_t nervana::base64::decode_codes
class
#include <batch_decoder.hpp>

Inherits from nervana::async_manager< encoded_record_list, fixed_buffer_map >

Public Functions

batch_decoder::batch_decoder(std::shared_ptr<batch_iterator> b_itor, size_t batch_size, uint32_t thread_count, bool pinned, const std::shared_ptr<provider_interface> &prov, uint32_t seed = 0)
batch_decoder::~batch_decoder()
virtual size_t nervana::batch_decoder::record_count() const
virtual size_t nervana::batch_decoder::elements_per_record() const
fixed_buffer_map *batch_decoder::filler()
void nervana::batch_decoder::register_info_handler(std::function<void(const fixed_buffer_map *)> &f)
void batch_decoder::process(const int index)

Private Members

size_t nervana::batch_decoder::m_batch_size
size_t nervana::batch_decoder::m_number_elements_in
size_t nervana::batch_decoder::m_number_elements_out
std::shared_ptr<const provider_interface> nervana::batch_decoder::m_provider
encoded_record_list *nervana::batch_decoder::m_inputs
fixed_buffer_map *nervana::batch_decoder::m_outputs
std::shared_ptr<thread_pool_queue<batch_decoder, &batch_decoder::process>> nervana::batch_decoder::m_thread_pool
std::function<void(const fixed_buffer_map *)> nervana::batch_decoder::m_info_handler
size_t nervana::batch_decoder::m_iteration_number
std::vector<nervana::random_engine_t> nervana::batch_decoder::m_random
bool nervana::batch_decoder::m_deterministic_mode
class
#include <batch_iterator.hpp>

Inherits from nervana::async_manager< encoded_record_list, encoded_record_list >

Public Functions

batch_iterator::batch_iterator(std::shared_ptr<block_manager>, size_t batch_size)
nervana::batch_iterator::~batch_iterator()
encoded_record_list *batch_iterator::filler()
size_t nervana::batch_iterator::record_count() const
size_t nervana::batch_iterator::elements_per_record() const
void nervana::batch_iterator::initialize()

Private Members

size_t nervana::batch_iterator::m_batch_size
size_t nervana::batch_iterator::m_element_count
encoded_record_list *nervana::batch_iterator::m_input_ptr
class
#include <batch_iterator.hpp>

Inherits from nervana::async_manager< fixed_buffer_map, fixed_buffer_map >

Public Functions

batch_iterator_fbm::batch_iterator_fbm(std::shared_ptr<batch_decoder> blkl, size_t batch_size, const std::shared_ptr<provider_interface> &prov, bool transpose)
nervana::batch_iterator_fbm::~batch_iterator_fbm()
fixed_buffer_map *batch_iterator_fbm::filler()
size_t nervana::batch_iterator_fbm::record_count() const
size_t nervana::batch_iterator_fbm::elements_per_record() const
void nervana::batch_iterator_fbm::initialize()

Private Members

size_t nervana::batch_iterator_fbm::m_batch_size
bool nervana::batch_iterator_fbm::m_transpose
size_t nervana::batch_iterator_fbm::m_element_count
fixed_buffer_map *nervana::batch_iterator_fbm::m_input_ptr
size_t nervana::batch_iterator_fbm::m_src_index
size_t nervana::batch_iterator_fbm::m_dst_index
class
#include <augment_image.hpp>

Inherits from nervana::json_configurable

Public Functions

nervana::augment::image::batch_sampler::batch_sampler()
augment::image::batch_sampler::batch_sampler(const nlohmann::json &config)
void augment::image::batch_sampler::sample_patches(const std::vector<normalized_box::box> &normalized_object_bboxes, std::vector<normalized_box::box> &normalized_output) const

Private Functions

bool nervana::augment::image::batch_sampler::has_max_sample() const

Private Members

int nervana::augment::image::batch_sampler::m_max_sample
unsigned int nervana::augment::image::batch_sampler::m_max_trials
nlohmann::json nervana::augment::image::batch_sampler::m_sampler_json
sampler nervana::augment::image::batch_sampler::m_sampler
nlohmann::json nervana::augment::image::batch_sampler::m_sample_constraint_json
sample_constraint nervana::augment::image::batch_sampler::m_sample_constraint
std::vector<std::shared_ptr<interface::config_info_interface>> nervana::augment::image::batch_sampler::config_list
struct
#include <avi.hpp>

Public Members

uint32_t nervana::BitmapInfoHeader::biSize
int32_t nervana::BitmapInfoHeader::biWidth
int32_t nervana::BitmapInfoHeader::biHeight
uint16_t nervana::BitmapInfoHeader::biPlanes
uint16_t nervana::BitmapInfoHeader::biBitCount
uint32_t nervana::BitmapInfoHeader::biCompression
uint32_t nervana::BitmapInfoHeader::biSizeImage
int32_t nervana::BitmapInfoHeader::biXPelsPerMeter
int32_t nervana::BitmapInfoHeader::biYPelsPerMeter
uint32_t nervana::BitmapInfoHeader::biClrUsed
uint32_t nervana::BitmapInfoHeader::biClrImportant
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::blob::blob(nlohmann::json js)
virtual nervana::provider::blob::~blob()
void provider::blob::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation&) const

Private Functions

nervana::provider::blob::blob()

Private Members

nervana::blob::config nervana::provider::blob::m_config
nervana::blob::extractor nervana::provider::blob::m_extractor
nervana::blob::loader nervana::provider::blob::m_loader
const std::string nervana::provider::blob::m_buffer_name
class
#include <block.hpp>

Public Functions

nervana::block_info::block_info(size_t start, size_t count)
size_t nervana::block_info::start() const
size_t nervana::block_info::count() const
size_t nervana::block_info::end() const

Private Members

size_t nervana::block_info::m_start
size_t nervana::block_info::m_count
class
#include <block_loader_file.hpp>

Inherits from nervana::block_loader_source, nervana::async_manager< std::vector< std::vector< std::string > >, encoded_record_list >

Public Functions

block_loader_file::block_loader_file(std::shared_ptr<manifest_file> mfst, size_t block_size)
virtual nervana::block_loader_file::~block_loader_file()
nervana::encoded_record_list *block_loader_file::filler()
size_t nervana::block_loader_file::block_count() const
size_t nervana::block_loader_file::record_count() const
size_t nervana::block_loader_file::block_size() const
size_t nervana::block_loader_file::elements_per_record() const
source_uid_t nervana::block_loader_file::get_uid() const
async_state nervana::block_loader_file::get_state() const
const std::string &nervana::block_loader_file::get_name() const

Private Members

size_t nervana::block_loader_file::m_block_size
size_t nervana::block_loader_file::m_block_count
size_t nervana::block_loader_file::m_record_count
size_t nervana::block_loader_file::m_elements_per_record
std::shared_ptr<manifest_file> nervana::block_loader_file::m_manifest
class
#include <block_loader_nds.hpp>

Inherits from nervana::block_loader_source, nervana::async_manager< encoded_record_list, encoded_record_list >

Public Functions

block_loader_nds::block_loader_nds(std::shared_ptr<manifest_nds>, size_t block_size)
virtual nervana::block_loader_nds::~block_loader_nds()
encoded_record_list *nervana::block_loader_nds::filler()
size_t nervana::block_loader_nds::record_count() const
size_t nervana::block_loader_nds::block_size() const
size_t nervana::block_loader_nds::block_count() const
size_t nervana::block_loader_nds::elements_per_record() const
source_uid_t nervana::block_loader_nds::get_uid() const

Private Members

size_t nervana::block_loader_nds::m_block_size
size_t nervana::block_loader_nds::m_block_count
size_t nervana::block_loader_nds::m_record_count
size_t nervana::block_loader_nds::m_elements_per_record
class
#include <block_loader_source.hpp>

Inherits from nervana::async_manager_source< encoded_record_list >

Subclassed by nervana::block_loader_file, nervana::block_loader_nds

Public Functions

virtual nervana::block_loader_source::~block_loader_source()
virtual size_t nervana::block_loader_source::block_size() const
= 0
virtual size_t nervana::block_loader_source::block_count() const
= 0
virtual source_uid_t nervana::block_loader_source::get_uid() const
= 0
class
#include <block_manager.hpp>

Inherits from nervana::async_manager< encoded_record_list, encoded_record_list >

Public Functions

nervana::block_manager::block_manager(std::shared_ptr<block_loader_source> file_loader, size_t block_size, const std::string &cache_root, bool enable_shuffle, uint32_t seed = 0)
virtual nervana::block_manager::~block_manager()
encoded_record_list *nervana::block_manager::filler()
virtual void nervana::block_manager::initialize()
size_t nervana::block_manager::record_count() const
size_t nervana::block_manager::elements_per_record() const

Private Members

std::unique_ptr<cache_system> nervana::block_manager::m_cache
size_t nervana::block_manager::m_current_block_number
size_t nervana::block_manager::m_block_size
size_t nervana::block_manager::m_block_count
size_t nervana::block_manager::m_record_count
size_t nervana::block_manager::m_elements_per_record
template <typename T>
class
#include <blocking_queue.h>

Public Functions

T BlockingQueue::pop()
void BlockingQueue::pop(T &item)
void BlockingQueue::top(T &item)
void BlockingQueue::push(const T &item)
void BlockingQueue::push(T &&item)
void BlockingQueue::clear()

Private Members

std::queue<T> BlockingQueue::m_queue
std::mutex BlockingQueue::m_mutex
std::condition_variable BlockingQueue::m_cond
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::boundingbox::boundingbox(nlohmann::json js, nlohmann::json aug)
virtual nervana::provider::boundingbox::~boundingbox()
void provider::boundingbox::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation &aug) const

Private Functions

nervana::provider::boundingbox::boundingbox()

Private Members

nervana::boundingbox::config nervana::provider::boundingbox::m_config
nervana::boundingbox::extractor nervana::provider::boundingbox::m_extractor
nervana::boundingbox::transformer nervana::provider::boundingbox::m_transformer
nervana::boundingbox::loader nervana::provider::boundingbox::m_loader
nervana::augment::image::param_factory nervana::provider::boundingbox::m_augmentation_factory
const std::string nervana::provider::boundingbox::m_buffer_name
class
#include <boundingbox.hpp>

Inherits from nervana::box

Public Functions

nervana::boundingbox::box::box()
nervana::boundingbox::box::box(float xmin, float ymin, float xmax, float ymax, int label = default_label, bool difficult = default_difficult, bool truncated = default_truncated)
nervana::boundingbox::box::~box()
float nervana::boundingbox::box::jaccard_overlap(const nervana::boundingbox::box &second_bbox) const
float nervana::boundingbox::box::coverage(const nervana::boundingbox::box &second_bbox) const
nervana::boundingbox::box nervana::boundingbox::box::intersect(const nervana::boundingbox::box &second_bbox) const
bool nervana::boundingbox::box::operator==(const nervana::boundingbox::box &b) const
bool nervana::boundingbox::box::operator!=(const nervana::boundingbox::box &b) const
boundingbox::box &nervana::boundingbox::box::operator=(const nervana::boundingbox::box &b)
boundingbox::box nervana::boundingbox::box::operator+(const cv::Point &s) const
boundingbox::box nervana::boundingbox::box::operator+(const boundingbox::box &b) const
boundingbox::box nervana::boundingbox::box::rescale(float x, float y) const
boundingbox::box nervana::boundingbox::box::expand(const cv::Size2i &expand_offset, const cv::Size2i &expand_size, const float expand_ratio) const
int nervana::boundingbox::box::label() const
bool nervana::boundingbox::box::difficult() const
bool nervana::boundingbox::box::truncated() const
nervana::normalized_box::box nervana::boundingbox::box::normalize(float width, float height) const

Public Static Attributes

const int nervana::boundingbox::box::default_label
const bool nervana::boundingbox::box::default_difficult
const bool nervana::boundingbox::box::default_truncated

Protected Attributes

int nervana::boundingbox::box::m_label
bool nervana::boundingbox::box::m_difficult
bool nervana::boundingbox::box::m_truncated
class
#include <normalized_box.hpp>

Inherits from nervana::box

Public Functions

nervana::normalized_box::box::box()
nervana::normalized_box::box::box(float xmin, float ymin, float xmax, float ymax)
nervana::normalized_box::box::~box()
nbox &nbox::operator=(const box &b)
float nervana::normalized_box::box::width() const
float nervana::normalized_box::box::height() const
cv::Rect nervana::normalized_box::box::rect() const
float nbox::jaccard_overlap(const nervana::normalized_box::box &second_box) const
float nbox::coverage(const nervana::normalized_box::box &second_box) const
nbox nbox::intersect(const nervana::normalized_box::box &second_box) const
nervana::boundingbox::box nervana::normalized_box::box::unnormalize(float width, float height)
bool nbox::is_properly_normalized() const

Protected Functions

void nbox::throw_if_improperly_normalized() const
class
#include <box.hpp>

Subclassed by nervana::boundingbox::box, nervana::normalized_box::box

Public Functions

nervana::box::box()
nervana::box::box(float xmin, float ymin, float xmax, float ymax)
virtual nervana::box::~box()
virtual float nervana::box::width() const
virtual float nervana::box::height() const
virtual cv::Rect nervana::box::rect() const
float nervana::box::size() const
nervana::box nervana::box::operator+(const nervana::box &b) const
nervana::box nervana::box::operator*(float v) const
bool nervana::box::operator==(const nervana::box &b) const
bool nervana::box::operator!=(const nervana::box &b) const
nervana::box &nervana::box::operator=(const nervana::box &b)
float nervana::box::ymin() const
float nervana::box::xmin() const
float nervana::box::ymax() const
float nervana::box::xmax() const
float nervana::box::xcenter() const
float nervana::box::ycenter() const
void nervana::box::set_xmin(float x)
void nervana::box::set_ymin(float y)
void nervana::box::set_xmax(float xmax)
void nervana::box::set_ymax(float ymax)

Protected Attributes

float nervana::box::m_xmin
float nervana::box::m_ymin
float nervana::box::m_xmax
float nervana::box::m_ymax
class
#include <buffer_batch.hpp>

Public Functions

nervana::buffer_fixed_size_elements::buffer_fixed_size_elements()
buffer_fixed_size_elements::buffer_fixed_size_elements(const shape_type &shp_tp, size_t batch_size, bool pinned = false)
buffer_fixed_size_elements::~buffer_fixed_size_elements()
buffer_fixed_size_elements::buffer_fixed_size_elements(const buffer_fixed_size_elements &rhs)
buffer_fixed_size_elements::buffer_fixed_size_elements(buffer_fixed_size_elements &&other)
buffer_fixed_size_elements &buffer_fixed_size_elements::operator=(buffer_fixed_size_elements &&other)
void buffer_fixed_size_elements::move(buffer_fixed_size_elements &second)
void buffer_fixed_size_elements::allocate()
void buffer_fixed_size_elements::deallocate()
const char *buffer_fixed_size_elements::get_item(size_t index) const
char *buffer_fixed_size_elements::get_item(size_t index)
cv::Mat buffer_fixed_size_elements::get_item_as_mat(size_t index, bool channel_major = false) const
char *nervana::buffer_fixed_size_elements::data() const
size_t nervana::buffer_fixed_size_elements::get_item_count() const
size_t nervana::buffer_fixed_size_elements::size() const
size_t nervana::buffer_fixed_size_elements::get_stride() const
const shape_type &nervana::buffer_fixed_size_elements::get_shape_type() const
std::ostream &buffer_fixed_size_elements::serialize(std::ostream &out) const
std::istream &buffer_fixed_size_elements::deserialize(std::istream &in)

Protected Attributes

char *nervana::buffer_fixed_size_elements::m_data
shape_type nervana::buffer_fixed_size_elements::m_shape_type
size_t nervana::buffer_fixed_size_elements::m_size
size_t nervana::buffer_fixed_size_elements::m_batch_size
size_t nervana::buffer_fixed_size_elements::m_stride
bool nervana::buffer_fixed_size_elements::m_pinned
class
#include <cache_system.hpp>

Public Functions

cache_system::cache_system(source_uid_t uid, size_t block_count, size_t elements_per_record, const std::string &cache_root, bool shuffle_enabled, uint32_t seed = 0)
cache_system::~cache_system()
void cache_system::load_block(encoded_record_list &buffer)
void cache_system::store_block(const encoded_record_list &buffer)
bool nervana::cache_system::is_complete()
bool nervana::cache_system::is_ownership()
void cache_system::try_get_access()
void cache_system::restart()

Private Types

enum type nervana::cache_system::stages

Values:

Private Functions

bool cache_system::check_if_complete(const std::string &cache_dir)
void cache_system::mark_cache_complete(const std::string &cache_dir)
bool cache_system::take_ownership(const std::string &cache_dir, int &lock)
void cache_system::release_ownership(const std::string &cache_dir, int lock)
string cache_system::create_cache_name(source_uid_t uid)
string cache_system::create_cache_block_name(size_t block_number)

Private Members

nervana::cache_system::stages nervana::cache_system::m_stage
size_t nervana::cache_system::m_block_count
std::vector<size_t> nervana::cache_system::m_block_load_sequence
const std::string nervana::cache_system::m_cache_root
std::string nervana::cache_system::m_cache_dir
bool nervana::cache_system::m_shuffle_enabled
size_t nervana::cache_system::m_elements_per_record
size_t nervana::cache_system::m_current_block_number
int nervana::cache_system::m_cache_lock
std::minstd_rand0 nervana::cache_system::m_random

Private Static Attributes

const std::string cache_system::m_owner_lock_filename
const std::string cache_system::m_cache_complete_filename
mutex cache_system::m_mutex
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::char_map::char_map(nlohmann::json js)
virtual nervana::provider::char_map::~char_map()
void provider::char_map::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation&) const

Private Functions

nervana::provider::char_map::char_map()

Private Members

nervana::char_map::config nervana::provider::char_map::m_config
nervana::char_map::extractor nervana::provider::char_map::m_extractor
nervana::char_map::loader nervana::provider::char_map::m_loader
const std::string nervana::provider::char_map::m_buffer_name
const std::string nervana::provider::char_map::m_length_name
class
#include <etl_image.hpp>

Configuration for image ETL.

An instantiation of this class controls the ETL of image data into the target memory buffers from the source CPIO archives.

Inherits from nervana::interface::config

Public Functions

image::config::config(nlohmann::json js)
const std::vector<std::shared_ptr<interface::config_info_interface>> &nervana::image::config::get_config_list()
nervana::image::config::config()

Public Members

uint32_t nervana::image::config::height
uint32_t nervana::image::config::width
std::string nervana::image::config::output_type
bool nervana::image::config::channel_major
uint32_t nervana::image::config::channels
std::string nervana::image::config::name

Private Functions

void image::config::validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::image::config::config_list
bool nervana::image::config::flip_enable
bool nervana::image::config::center

Friends

friend nervana::image::config::video::config
friend nervana::image::config::multicrop::config
class
#include <etl_label.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::label::config::config(nlohmann::json js)

Public Members

bool nervana::label::config::binary
std::string nervana::label::config::output_type
std::string nervana::label::config::type
std::string nervana::label::config::name

Private Functions

nervana::label::config::config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::label::config::config_list
class
#include <etl_label_map.hpp>

Inherits from nervana::interface::config

Public Functions

config::config(nlohmann::json js)
virtual nervana::label_map::config::~config()
int nervana::label_map::config::max_label_count() const

Public Members

std::string nervana::label_map::config::output_type
std::vector<std::string> nervana::label_map::config::class_names
int nervana::label_map::config::max_classes
std::string nervana::label_map::config::name

Private Functions

nervana::label_map::config::config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::label_map::config::config_list
class
#include <etl_localization_rcnn.hpp>

Inherits from nervana::interface::config

Public Functions

localization::rcnn::config::config(nlohmann::json js)
size_t nervana::localization::rcnn::config::total_anchors() const

Public Members

size_t nervana::localization::rcnn::config::rois_per_image
size_t nervana::localization::rcnn::config::height
size_t nervana::localization::rcnn::config::width
size_t nervana::localization::rcnn::config::base_size
float nervana::localization::rcnn::config::scaling_factor
std::vector<float> nervana::localization::rcnn::config::ratios
std::vector<float> nervana::localization::rcnn::config::scales
float nervana::localization::rcnn::config::negative_overlap
float nervana::localization::rcnn::config::positive_overlap
float nervana::localization::rcnn::config::foreground_fraction
size_t nervana::localization::rcnn::config::max_gt_boxes
std::vector<std::string> nervana::localization::rcnn::config::class_names
std::string nervana::localization::rcnn::config::name
size_t nervana::localization::rcnn::config::output_buffer_size
std::unordered_map<std::string, int> nervana::localization::rcnn::config::class_name_map

Private Functions

nervana::localization::rcnn::config::config()
void localization::rcnn::config::validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::localization::rcnn::config::config_list
class
#include <etl_localization_ssd.hpp>

Inherits from nervana::interface::config

Public Functions

localization::ssd::config::config(nlohmann::json js)

Public Members

size_t nervana::localization::ssd::config::height
size_t nervana::localization::ssd::config::width
size_t nervana::localization::ssd::config::max_gt_boxes
std::vector<std::string> nervana::localization::ssd::config::class_names
std::string nervana::localization::ssd::config::name
size_t nervana::localization::ssd::config::output_buffer_size
std::unordered_map<std::string, int> nervana::localization::ssd::config::class_name_map

Private Functions

nervana::localization::ssd::config::config()
void nervana::localization::ssd::config::validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::localization::ssd::config::config_list
class
#include <etl_audio.hpp>

Configuration for audio ETL.

An instantiation of this class controls the ETL of audio data into the target memory buffers from the source CPIO archives.

Extract

  • Audio files should be stored in mono, PCM-16 .wav format. If needed, you should create an ingestion script to convert to this format (commonly using sox or ffmpeg)

Transform

  • Audio can be transformed into three different representations: spectrogram, mel-frequency spectral coefficients, or mel-frequency cepstral coefficients

Load

  • Just a simple loading into a memory buffer.

Inherits from nervana::interface::config

Public Functions

nervana::audio::config::config(nlohmann::json js)

Parses the configuration JSON.

void nervana::audio::config::validate()

Public Members

std::string nervana::audio::config::name
std::string nervana::audio::config::max_duration

Maximum duration of any audio clip in units of “seconds”, “milliseconds”, or “samples” (e.g. “4 seconds”).

std::string nervana::audio::config::frame_stride

Interval between consecutive frames in units of “seconds”, “milliseconds”, or “samples” (e.g. .01 seconds).

std::string nervana::audio::config::frame_length

Duration of each frame in units of “seconds”, “milliseconds”, or “samples” (e.g. .025 seconds).

uint32_t nervana::audio::config::num_cepstra

Number of cepstra to use (only for feature_type=”mfcc”)

uint32_t nervana::audio::config::num_filters

Number of filters to use for mel-frequency transform (used in feature_type=”mfsc”) (Not used for mfcc?)

std::string nervana::audio::config::output_type

Input data type. Currently only “uint8_t” is supported.

std::string nervana::audio::config::feature_type

Feature space to represent audio. Options are “specgram” - Short-time fourier transform, “mfsc” - Mel-Frequency spectrogram, “mfcc” - Mel-Frequency cepstral coefficients

std::string nervana::audio::config::window_type

Window type for spectrogram generation

std::string nervana::audio::config::noise_index_file
std::string nervana::audio::config::noise_root
uint32_t nervana::audio::config::sample_freq_hz

Sample rate of input audio in hertz

std::uniform_real_distribution<float> nervana::audio::config::time_scale_fraction

Simple linear time-warping

std::uniform_real_distribution<float> nervana::audio::config::noise_level

How much noise to add (a value of 1 would be 0 dB SNR)

uint32_t nervana::audio::config::time_steps
uint32_t nervana::audio::config::freq_steps
uint32_t nervana::audio::config::max_duration_tn
uint32_t nervana::audio::config::frame_length_tn
uint32_t nervana::audio::config::frame_stride_tn
float nervana::audio::config::max_duration_ms
float nervana::audio::config::frame_length_ms
float nervana::audio::config::frame_stride_ms
std::bernoulli_distribution nervana::audio::config::add_noise

Probability of adding noise

std::uniform_int_distribution<uint32_t> nervana::audio::config::noise_index

Index into noise index file

std::uniform_real_distribution<float> nervana::audio::config::noise_offset_fraction

Offset from start of noise file

bool nervana::audio::config::emit_length

Whether to also output length of the buffer

Private Functions

nervana::audio::config::config()
void nervana::audio::config::parse_samples_or_seconds(const std::string &unit, float &ms, uint32_t &tn)

Private Members

float nervana::audio::config::add_noise_probability
std::vector<std::shared_ptr<interface::config_info_interface>> nervana::audio::config::config_list
class
#include <etl_video.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::video::config::config(nlohmann::json js)

Public Members

uint32_t nervana::video::config::max_frame_count
nervana::image::config nervana::video::config::frame
std::string nervana::video::config::name

Private Functions

nervana::video::config::config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::video::config::config_list
class
#include <etl_blob.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::blob::config::config(nlohmann::json js)

Public Members

std::string nervana::blob::config::output_type
size_t nervana::blob::config::output_count
std::string nervana::blob::config::name

Private Functions

nervana::blob::config::config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::blob::config::config_list
class
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::config

Public Functions

boundingbox::config::config(nlohmann::json js)

Public Members

size_t nervana::boundingbox::config::height
size_t nervana::boundingbox::config::width
size_t nervana::boundingbox::config::max_bbox_count
std::vector<std::string> nervana::boundingbox::config::class_names
std::string nervana::boundingbox::config::output_type
std::string nervana::boundingbox::config::name
std::unordered_map<std::string, int> nervana::boundingbox::config::label_map

Private Functions

nervana::boundingbox::config::config()
void boundingbox::config::validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::boundingbox::config::config_list
class
#include <interface.hpp>

Inherits from nervana::json_configurable

Subclassed by nervana::audio::config, nervana::blob::config, nervana::boundingbox::config, nervana::char_map::config, nervana::image::config, nervana::label::config, nervana::label_map::config, nervana::loader_config, nervana::localization::rcnn::config, nervana::localization::ssd::config, nervana::provider_config, nervana::video::config

Public Functions

nervana::interface::config::config()
const nervana::shape_type &nervana::interface::config::get_shape_type(size_t index = 0) const
const std::vector<nervana::shape_type> &nervana::interface::config::get_shape_type_list() const
void nervana::interface::config::add_shape_type(const std::vector<size_t> &shape_, const std::string &output_type_)
void nervana::interface::config::add_shape_type(const std::vector<size_t> &shape_, const nervana::output_type &output_type_)
void nervana::interface::config::add_shape_type(const std::vector<size_t> &shape_, const std::vector<std::string> &names_, const nervana::output_type &output_type_)

Private Members

std::vector<nervana::shape_type> nervana::interface::config::m_shape_type_list
class
#include <etl_char_map.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::char_map::config::config(nlohmann::json js)
const cmap_t &nervana::char_map::config::get_cmap() const

Public Members

uint32_t nervana::char_map::config::max_length

Maximum length of each transcript. Samples with longer transcripts will be truncated

std::string nervana::char_map::config::alphabet

Character map alphabet

std::wstring nervana::char_map::config::walphabet

Same alphabet in wchar_t

uint32_t nervana::char_map::config::unknown_value

Integer value to give to unknown characters. 0 causes them to be discarded.

bool nervana::char_map::config::emit_length

Whether to also output the number of valid characters per record

std::string nervana::char_map::config::output_type

Output data type

std::string nervana::char_map::config::name

Private Functions

nervana::char_map::config::config()
void nervana::char_map::config::validate()
bool nervana::char_map::config::unique_chars(std::wstring test_string)

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> nervana::char_map::config::config_list
cmap_t nervana::char_map::config::_cmap

Friends

friend nervana::char_map::config::extractor
template <typename>
class
#include <interface.hpp>

Inherits from nervana::interface::config_info_interface

Public Functions

nervana::interface::config_info::config_info(T &var, const std::string &name, nervana::interface::config::mode m, std::function<void(T&, const std::string&, const nlohmann::json&, nervana::interface::config::mode)> parse, std::function<bool(T)> validate = [](T) -> bool{return true;})
virtual nervana::interface::config_info::~config_info()
const std::string &nervana::interface::config_info::name() const
bool nervana::interface::config_info::required() const
std::string nervana::interface::config_info::type() const
std::string nervana::interface::config_info::get_default_value() const
void nervana::interface::config_info::parse(nlohmann::json js)

Private Functions

nervana::interface::config_info::config_info()

Private Members

T &nervana::interface::config_info::m_target_variable
const std::string nervana::interface::config_info::m_variable_name
nervana::interface::config::mode nervana::interface::config_info::m_parse_mode
std::function<void(T&, const std::string&, const nlohmann::json&, nervana::interface::config::mode)> nervana::interface::config_info::m_parse_function
std::function<bool(T)> nervana::interface::config_info::m_validate_function
T nervana::interface::config_info::m_default_value
class
#include <interface.hpp>

Subclassed by nervana::interface::config_info< typename >

Public Functions

virtual nervana::interface::config_info_interface::~config_info_interface()
virtual const std::string &nervana::interface::config_info_interface::name() const
= 0
virtual void nervana::interface::config_info_interface::parse(nlohmann::json js)
= 0
virtual bool nervana::interface::config_info_interface::required() const
= 0
virtual std::string nervana::interface::config_info_interface::type() const
= 0
virtual std::string nervana::interface::config_info_interface::get_default_value() const
= 0
class
#include <web_server.hpp>

Inherits from streambuf

Public Functions

web::tcp::connection::connection(uint16_t port)
web::tcp::connection::~connection()
void web::tcp::connection::close()
std::shared_ptr<web::tcp::connection> web::tcp::connection::listen()
void web::tcp::connection::write(const std::string &s)
void web::tcp::connection::write(const char *data, size_t size)
void web::tcp::connection::flush()
ostream &web::tcp::connection::get_output_stream()
istream &web::tcp::connection::get_input_stream()

Private Functions

streamsize web::tcp::connection::xsputn(const char *s, std::streamsize n)
int web::tcp::connection::overflow(std::streambuf::int_type c)
std::streambuf::int_type web::tcp::connection::underflow()
web::tcp::connection::connection()

Private Members

int web::tcp::connection::m_socket
std::ostream web::tcp::connection::m_ostream
std::istream web::tcp::connection::m_istream
const std::size_t web::tcp::connection::m_put_back
std::vector<char> web::tcp::connection::m_char_buffer
bool web::tcp::connection::m_is_server
uint16_t web::tcp::connection::m_listening_port
class
#include <log.hpp>

Public Functions

template <size_t SIZE>
constexpr nervana::conststring::conststring(const char (&p)[SIZE])
constexpr char nervana::conststring::operator[](size_t i) const
constexpr const char *nervana::conststring::get_ptr(size_t offset) const
constexpr size_t nervana::conststring::size() const

Private Members

const char *nervana::conststring::_string
size_t nervana::conststring::_size
class
#include <crc.hpp>

CRC-32 Checksum Calculation.

Uses CRC polynomial 0xEDB88320

Inherits from CryptoPP::HashTransformation

Public Functions

CryptoPP::CRC32::CRC32()
void CryptoPP::CRC32::Update(const byte *input, size_t length)
void CryptoPP::CRC32::TruncatedFinal(byte *hash, size_t size)
unsigned int CryptoPP::CRC32::DigestSize() const
std::string CryptoPP::CRC32::AlgorithmName() const
void CryptoPP::CRC32::UpdateByte(byte b)
byte CryptoPP::CRC32::GetCrcByte(size_t i) const

Public Static Functions

static CRYPTOPP_CONSTEXPR const char* CryptoPP::CRC32::StaticAlgorithmName()

Protected Functions

void CryptoPP::CRC32::Reset()

Private Members

word32 CryptoPP::CRC32::m_crc

Private Static Attributes

const word32 CryptoPP::CRC32::m_tab
class
#include <crc.hpp>

CRC-32C Checksum Calculation.

Uses CRC polynomial 0x82F63B78

Since
Crypto++ 5.6.4

Inherits from CryptoPP::HashTransformation

Public Functions

CryptoPP::CRC32C::CRC32C()
void CryptoPP::CRC32C::Update(const byte *input, size_t length)
void CryptoPP::CRC32C::TruncatedFinal(byte *hash, size_t size)
unsigned int CryptoPP::CRC32C::DigestSize() const
std::string CryptoPP::CRC32C::AlgorithmName() const
void CryptoPP::CRC32C::UpdateByte(byte b)
byte CryptoPP::CRC32C::GetCrcByte(size_t i) const

Public Static Functions

static CRYPTOPP_CONSTEXPR const char* CryptoPP::CRC32C::StaticAlgorithmName()

Protected Functions

void CryptoPP::CRC32C::Reset()

Private Members

word32 CryptoPP::CRC32C::m_crc

Private Static Attributes

const word32 CryptoPP::CRC32C::m_tab
struct
#include <wav_data.hpp>

Public Members

uint32_t nervana::DataHeader::dwDataCC
uint32_t nervana::DataHeader::dwDataLen
class
#include <etl_image.hpp>

Inherits from nervana::interface::decoded_image

Public Functions

nervana::image::decoded::decoded()
nervana::image::decoded::decoded(cv::Mat img)
bool nervana::image::decoded::add(cv::Mat img)
bool nervana::image::decoded::add(const std::vector<cv::Mat> &images)
virtual nervana::image::decoded::~decoded()
cv::Mat &nervana::image::decoded::get_image(int index)
cv::Size2i nervana::image::decoded::get_image_size() const
int nervana::image::decoded::get_image_channels() const
size_t nervana::image::decoded::get_image_count() const
size_t nervana::image::decoded::get_size() const
cv::Size2i nervana::image::decoded::image_size() const

Protected Functions

bool nervana::image::decoded::all_images_are_same_size()

Protected Attributes

std::vector<cv::Mat> nervana::image::decoded::_images
class
#include <etl_label.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

nervana::label::decoded::decoded(int index)
virtual nervana::label::decoded::~decoded()
int nervana::label::decoded::get_index()

Private Functions

nervana::label::decoded::decoded()

Private Members

int nervana::label::decoded::_index
class
#include <etl_label_map.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded::decoded()
virtual nervana::label_map::decoded::~decoded()
const std::vector<int> &nervana::label_map::decoded::get_data() const

Private Members

std::vector<int> nervana::label_map::decoded::labels

Friends

friend nervana::label_map::decoded::label_map::extractor
class
#include <etl_localization_rcnn.hpp>

Inherits from nervana::boundingbox::decoded

Public Functions

nervana::localization::rcnn::decoded::decoded()
virtual nervana::localization::rcnn::decoded::~decoded()

Public Members

std::vector<int> nervana::localization::rcnn::decoded::labels
std::vector<target> nervana::localization::rcnn::decoded::bbox_targets
std::vector<int> nervana::localization::rcnn::decoded::anchor_index
float nervana::localization::rcnn::decoded::image_scale
cv::Size nervana::localization::rcnn::decoded::output_image_size
cv::Size nervana::localization::rcnn::decoded::input_image_size
std::vector<boundingbox::box> nervana::localization::rcnn::decoded::gt_boxes
class
#include <etl_localization_ssd.hpp>

Inherits from nervana::boundingbox::decoded

Public Functions

nervana::localization::ssd::decoded::decoded()
virtual nervana::localization::ssd::decoded::~decoded()

Public Members

cv::Size nervana::localization::ssd::decoded::output_image_size
cv::Size nervana::localization::ssd::decoded::input_image_size
std::vector<boundingbox::box> nervana::localization::ssd::decoded::gt_boxes

Friends

friend nervana::localization::ssd::decoded::extractor
class
#include <etl_audio.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

nervana::audio::decoded::decoded(cv::Mat raw)
size_t nervana::audio::decoded::size()
cv::Mat &nervana::audio::decoded::get_time_data()
cv::Mat &nervana::audio::decoded::get_freq_data()

Public Members

uint32_t nervana::audio::decoded::valid_frames

Protected Attributes

cv::Mat nervana::audio::decoded::time_rep
cv::Mat nervana::audio::decoded::freq_rep
class
#include <etl_blob.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

nervana::blob::decoded::decoded(const void *buf, size_t bufSize)
virtual nervana::blob::decoded::~decoded()

Private Members

const void *nervana::blob::decoded::m_data
size_t nervana::blob::decoded::m_data_size

Friends

friend nervana::blob::decoded::loader
class
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::decoded_image

Subclassed by nervana::localization::rcnn::decoded, nervana::localization::ssd::decoded

Public Functions

boundingbox::decoded::decoded()
bool nervana::boundingbox::decoded::extract(const void *data, size_t size, const std::unordered_map<std::string, int> &label_map)
virtual nervana::boundingbox::decoded::~decoded()
const std::vector<boundingbox::box> &nervana::boundingbox::decoded::boxes() const
int nervana::boundingbox::decoded::width() const
int nervana::boundingbox::decoded::height() const
int nervana::boundingbox::decoded::depth() const
cv::Size2i nervana::boundingbox::decoded::image_size() const

Protected Attributes

std::vector<boundingbox::box> nervana::boundingbox::decoded::m_boxes
int nervana::boundingbox::decoded::m_width
int nervana::boundingbox::decoded::m_height
int nervana::boundingbox::decoded::m_depth

Friends

friend nervana::boundingbox::decoded::transformer
friend nervana::boundingbox::decoded::extractor
class
#include <etl_char_map.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

nervana::char_map::decoded::decoded(std::vector<uint32_t> char_ints, uint32_t nvalid)
virtual nervana::char_map::decoded::~decoded()
std::vector<uint32_t> nervana::char_map::decoded::get_data() const
uint32_t nervana::char_map::decoded::get_length() const

Private Members

std::vector<uint32_t> nervana::char_map::decoded::_labels
uint32_t nervana::char_map::decoded::_nvalid
class
#include <interface.hpp>

Inherits from nervana::interface::decoded_media

Subclassed by nervana::boundingbox::decoded, nervana::image::decoded

Public Functions

virtual cv::Size2i nervana::interface::decoded_image::image_size() const
= 0
virtual nervana::interface::decoded_image::~decoded_image()
class
#include <interface.hpp>

Subclassed by nervana::audio::decoded, nervana::blob::decoded, nervana::char_map::decoded, nervana::interface::decoded_image, nervana::label::decoded, nervana::label_map::decoded

Public Functions

virtual nervana::interface::decoded_media::~decoded_media()
class
#include <buffer_batch.hpp>

Public Functions

variable_record_field &encoded_record::element(size_t index)
const variable_record_field &encoded_record::element(size_t index) const
size_t nervana::encoded_record::size() const
void nervana::encoded_record::add_element(const void *data, size_t size)
void nervana::encoded_record::add_element(const std::vector<char> &data)
void nervana::encoded_record::add_element(std::vector<char> &&data)
void nervana::encoded_record::add_exception(std::exception_ptr e)
variable_record_field_list::iterator nervana::encoded_record::begin()
variable_record_field_list::iterator nervana::encoded_record::end()
void nervana::encoded_record::rethrow_if_exception() const

Private Members

variable_record_field_list nervana::encoded_record::m_elements
std::exception_ptr nervana::encoded_record::m_exception

Friends

friend nervana::encoded_record::encoded_record_list
class
#include <buffer_batch.hpp>

Public Functions

encoded_record &nervana::encoded_record_list::record(size_t index)
const encoded_record &nervana::encoded_record_list::record(size_t index) const
void nervana::encoded_record_list::add_record(const encoded_record &buffer)
void nervana::encoded_record_list::add_record(encoded_record &&buffer)
size_t nervana::encoded_record_list::size() const
size_t nervana::encoded_record_list::elements_per_record() const
void nervana::encoded_record_list::swap(encoded_record_list &other)
void nervana::encoded_record_list::move_to(encoded_record_list &target, size_t count)
void nervana::encoded_record_list::clear()
std::vector<encoded_record>::iterator nervana::encoded_record_list::begin()
std::vector<encoded_record>::iterator nervana::encoded_record_list::end()
std::vector<encoded_record>::const_iterator nervana::encoded_record_list::begin() const
std::vector<encoded_record>::const_iterator nervana::encoded_record_list::end() const
void nervana::encoded_record_list::shuffle(uint32_t random_seed)

Private Functions

void nervana::encoded_record_list::verify(const encoded_record &buffer)

Private Members

std::vector<encoded_record> nervana::encoded_record_list::m_records
size_t nervana::encoded_record_list::m_elements_per_record
class
#include <event.hpp>

Public Functions

nervana::event::event()
void nervana::event::wait()
void nervana::event::notify()
void nervana::event::wait_multiple()
void nervana::event::notify_all()

Private Members

std::condition_variable nervana::event::_condition
std::mutex nervana::event::_mutex
bool nervana::event::_ready
class
#include <etl_char_map.hpp>

Inherits from nervana::interface::extractor< char_map::decoded >

Public Functions

nervana::char_map::extractor::extractor(const char_map::config &cfg)
virtual nervana::char_map::extractor::~extractor()
std::shared_ptr<char_map::decoded> char_map::extractor::extract(const void *in_array, size_t in_sz) const

Private Members

const cmap_t &nervana::char_map::extractor::_cmap
uint32_t nervana::char_map::extractor::_max_length
const uint32_t nervana::char_map::extractor::_unknown_value
class
#include <etl_depthmap.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

depthmap::extractor::extractor(const image::config &config)
depthmap::extractor::~extractor()
shared_ptr<image::decoded> depthmap::extractor::extract(const void *inbuf, size_t insize) const
class
#include <etl_image.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

image::extractor::extractor(const image::config &cfg)
nervana::image::extractor::~extractor()
shared_ptr<image::decoded> image::extractor::extract(const void *inbuf, size_t insize) const
int nervana::image::extractor::get_channel_count()

Private Members

int nervana::image::extractor::_pixel_type
int nervana::image::extractor::_color_mode
class
#include <etl_label.hpp>

Inherits from nervana::interface::extractor< label::decoded >

Public Functions

nervana::label::extractor::extractor(const label::config &cfg)
nervana::label::extractor::~extractor()
std::shared_ptr<label::decoded> nervana::label::extractor::extract(const void *buf, size_t bufSize) const

Private Members

bool nervana::label::extractor::_binary
class
#include <etl_label_map.hpp>

Inherits from nervana::interface::extractor< label_map::decoded >

Public Functions

extractor::extractor(const label_map::config &cfg)
virtual nervana::label_map::extractor::~extractor()
shared_ptr<decoded> extractor::extract(const void *data, size_t size) const
const std::unordered_map<std::string, int> &nervana::label_map::extractor::get_data()

Private Members

std::unordered_map<std::string, int> nervana::label_map::extractor::dictionary
class
#include <etl_localization_rcnn.hpp>

Inherits from nervana::interface::extractor< localization::rcnn::decoded >

Public Functions

localization::rcnn::extractor::extractor(const localization::rcnn::config &cfg)
virtual std::shared_ptr<localization::rcnn::decoded> nervana::localization::rcnn::extractor::extract(const void *data, size_t size) const
virtual nervana::localization::rcnn::extractor::~extractor()

Private Functions

nervana::localization::rcnn::extractor::extractor()

Private Members

const boundingbox::extractor nervana::localization::rcnn::extractor::bbox_extractor
class
#include <etl_localization_ssd.hpp>

Inherits from nervana::interface::extractor< ssd::decoded >

Public Functions

localization::ssd::extractor::extractor(const ssd::config &_cfg)
virtual nervana::localization::ssd::extractor::~extractor()
std::shared_ptr<localization::ssd::decoded> localization::ssd::extractor::extract(const void *data, size_t size) const

Private Functions

nervana::localization::ssd::extractor::extractor()

Private Members

boundingbox::extractor nervana::localization::ssd::extractor::bbox_extractor
config nervana::localization::ssd::extractor::cfg
class
#include <etl_pixel_mask.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

pixel_mask::extractor::extractor(const image::config &config)
pixel_mask::extractor::~extractor()
shared_ptr<image::decoded> pixel_mask::extractor::extract(const void *inbuf, size_t insize) const
class
#include <etl_video.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

nervana::video::extractor::extractor(const video::config&)
virtual nervana::video::extractor::~extractor()
std::shared_ptr<image::decoded> video::extractor::extract(const void *item, size_t itemSize) const

Private Functions

nervana::video::extractor::extractor()
class
#include <etl_audio.hpp>

Inherits from nervana::interface::extractor< audio::decoded >

Public Functions

nervana::audio::extractor::extractor()
nervana::audio::extractor::~extractor()
std::shared_ptr<audio::decoded> audio::extractor::extract(const void *item, size_t itemSize) const

Extract audio data from a wav file using sox.

template <typename T>
class
#include <interface.hpp>

Public Functions

virtual nervana::interface::extractor::~extractor()
virtual std::shared_ptr<T> nervana::interface::extractor::extract(const void *, size_t) const
= 0
class
#include <etl_blob.hpp>

Inherits from nervana::interface::extractor< blob::decoded >

Public Functions

nervana::blob::extractor::extractor(const blob::config &cfg)
nervana::blob::extractor::~extractor()
std::shared_ptr<blob::decoded> nervana::blob::extractor::extract(const void *buf, size_t bufSize) const
class
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::extractor< nervana::boundingbox::decoded >

Public Functions

boundingbox::extractor::extractor(const std::unordered_map<std::string, int> &map)
virtual nervana::boundingbox::extractor::~extractor()
shared_ptr<boundingbox::decoded> boundingbox::extractor::extract(const void *data, size_t size) const
void boundingbox::extractor::extract(const void *data, size_t size, std::shared_ptr<boundingbox::decoded> &rc) const

Private Functions

nervana::boundingbox::extractor::extractor()
int nervana::boundingbox::extractor::get_label(const nlohmann::json &object) const

Private Members

std::unordered_map<std::string, int> nervana::boundingbox::extractor::label_map
class
#include <cpio.hpp>

Public Functions

cpio::file_header::file_header()
void cpio::file_header::read(std::istream &ifs)
void cpio::file_header::write(std::ostream &ofs)

Private Members

char nervana::cpio::file_header::m_magic[4]
uint32_t nervana::cpio::file_header::m_format_version
uint32_t nervana::cpio::file_header::m_writer_version
char nervana::cpio::file_header::m_data_type[8]
uint32_t nervana::cpio::file_header::m_record_count
uint32_t nervana::cpio::file_header::m_elements_per_record
uint8_t nervana::cpio::file_header::m_unused[36]

Friends

friend nervana::cpio::file_header::reader
friend nervana::cpio::file_header::writer
class
#include <cpio.hpp>

Public Functions

cpio::file_trailer::file_trailer()
void cpio::file_trailer::write(std::ostream &ofs)
void cpio::file_trailer::read(std::istream &ifs)

Private Members

uint32_t nervana::cpio::file_trailer::m_unused[4]
class
#include <file_util.hpp>

Public Static Functions

string nervana::file_util::path_join(const std::string &s1, const std::string &s2)
size_t nervana::file_util::get_file_size(const std::string &filename)
void nervana::file_util::remove_directory(const std::string &dir)
bool nervana::file_util::make_directory(const std::string &dir)
string nervana::file_util::make_temp_directory(const std::string &path = "")
std::string nervana::file_util::get_temp_directory()
void nervana::file_util::remove_file(const std::string &file)
vector<char> nervana::file_util::read_file_contents(const std::string &path)
std::string nervana::file_util::read_file_to_string(const std::string &path)
void nervana::file_util::iterate_files(const std::string &path, std::function<void(const std::string &file, bool is_dir)> func, bool recurse = false, )
string nervana::file_util::tmp_filename(const std::string &extension = "")
void nervana::file_util::touch(const std::string &filename)
bool nervana::file_util::exists(const std::string &filename)
int nervana::file_util::try_get_lock(const std::string &filename)
void nervana::file_util::release_lock(int fd, const std::string &filename)

Private Static Functions

void nervana::file_util::iterate_files_worker(const std::string &path, std::function<void(const std::string &file, bool is_dir)> func, bool recurse = false, )
class
#include <buffer_batch.hpp>

Public Functions

nervana::fixed_buffer_map::fixed_buffer_map()
nervana::fixed_buffer_map::fixed_buffer_map(const std::vector<std::pair<std::string, shape_type>> &write_sizes, size_t batch_size, bool pinned = false)
nervana::fixed_buffer_map::fixed_buffer_map(fixed_buffer_map &&buffer)
fixed_buffer_map &nervana::fixed_buffer_map::operator=(fixed_buffer_map &&buffer)
void nervana::fixed_buffer_map::add_items(const std::vector<std::pair<std::string, shape_type>> &write_sizes, size_t batch_size, bool pinned = false)
void nervana::fixed_buffer_map::add_item(const std::string &name, const shape_type &shp_tp, size_t batch_size, bool pinned = false)
void nervana::fixed_buffer_map::clear()
nervana::fixed_buffer_map::~fixed_buffer_map()
const std::vector<std::string> &nervana::fixed_buffer_map::get_names() const
const buffer_fixed_size_elements *nervana::fixed_buffer_map::operator[](const std::string &name) const
buffer_fixed_size_elements *nervana::fixed_buffer_map::operator[](const std::string &name)
void fixed_buffer_map::copy(fixed_buffer_map &src, size_t src_index, size_t dst_index, size_t count, size_t batch_size, bool transpose)
size_t nervana::fixed_buffer_map::size() const
std::ostream &fixed_buffer_map::serialize(std::ostream &out) const
std::istream &fixed_buffer_map::deserialize(std::istream &in)

Private Functions

nervana::fixed_buffer_map::fixed_buffer_map(const fixed_buffer_map&)
const buffer_fixed_size_elements *nervana::fixed_buffer_map::operator[](int) const
buffer_fixed_size_elements *nervana::fixed_buffer_map::operator[](int)

Private Members

std::vector<std::string> nervana::fixed_buffer_map::m_names
std::vector<std::pair<std::string, buffer_fixed_size_elements *>> nervana::fixed_buffer_map::m_data
struct
#include <wav_data.hpp>

Public Members

uint32_t nervana::FmtHeader::dwFmtCC
uint32_t nervana::FmtHeader::dwFmtLen
uint16_t nervana::FmtHeader::hwFmtTag
uint16_t nervana::FmtHeader::hwChannels
uint32_t nervana::FmtHeader::dwSampleRate
uint32_t nervana::FmtHeader::dwBytesPerSec
uint16_t nervana::FmtHeader::hwBlockAlign
uint16_t nervana::FmtHeader::hwBitDepth
class
#include <crc.hpp>

Subclassed by CryptoPP::CRC32, CryptoPP::CRC32C

class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::image::image(nlohmann::json config, nlohmann::json aug)
virtual nervana::provider::image::~image()
void provider::image::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation &aug) const

Private Members

const nervana::image::config nervana::provider::image::m_config
nervana::image::extractor nervana::provider::image::m_extractor
nervana::image::transformer nervana::provider::image::m_transformer
nervana::augment::image::param_factory nervana::provider::image::m_augmentation_factory
nervana::image::loader nervana::provider::image::m_loader
const std::string nervana::provider::image::m_buffer_name
class
#include <provider.hpp>

Inherits from nervana::provider_interface

Subclassed by nervana::provider::audio, nervana::provider::blob, nervana::provider::boundingbox, nervana::provider::char_map, nervana::provider::image, nervana::provider::label, nervana::provider::label_map, nervana::provider::localization::rcnn, nervana::provider::localization::ssd, nervana::provider::pixelmask, nervana::provider::video

Public Functions

provider::interface::interface(nlohmann::json js, size_t input_count)
virtual nervana::provider::interface::~interface()
virtual void nervana::provider::interface::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation&) const
= 0

Public Static Functions

string provider::interface::create_name(const std::string &name, const std::string &base_name)

Private Functions

void nervana::provider::interface::provide(int idx, nervana::encoded_record_list &in_buf, nervana::fixed_buffer_map &out_buf) const
class
#include <loader.hpp>

Inherits from std::iterator< std::input_iterator_tag,fixed_buffer_map >

Public Functions

loader::iterator::iterator(loader &ld, bool is_end)
loader::iterator::iterator(const iterator &other)
nervana::loader::iterator::~iterator()
loader::iterator &loader::iterator::operator++()
loader::iterator &loader::iterator::operator++(int)
bool loader::iterator::operator==(const iterator &other) const
bool loader::iterator::operator!=(const iterator &other) const
const fixed_buffer_map &loader::iterator::operator*() const
const size_t &nervana::loader::iterator::position() const
bool loader::iterator::positional_end() const

Private Functions

nervana::loader::iterator::iterator()

Private Members

loader &nervana::loader::iterator::m_current_loader
const bool nervana::loader::iterator::m_is_end

Friends

friend nervana::loader::iterator::loader_local
class
#include <interface.hpp>

Subclassed by nervana::augment::audio::param_factory, nervana::augment::image::batch_sampler, nervana::augment::image::param_factory, nervana::augment::image::sample_constraint, nervana::augment::image::sampler, nervana::interface::config

Public Types

enum type nervana::json_configurable::mode

Values:

Public Functions

void json_configurable::verify_config(const std::string &location, const std::vector<std::shared_ptr<interface::config_info_interface>> &config, nlohmann::json js) const

Public Static Functions

template <typename T, typename S>
static void nervana::json_configurable::set_dist_params(T &dist, S &params)
static void nervana::json_configurable::set_dist_params(std::bernoulli_distribution &dist, std::vector<bool> &params)
template <typename T>
static void nervana::json_configurable::parse_dist(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void nervana::json_configurable::parse_value(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void nervana::json_configurable::parse_json(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void nervana::json_configurable::parse_object(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void nervana::json_configurable::parse_enum(T &value, const std::string key, const nlohmann::json &js, mode required = mode::OPTIONAL)
class
#include <json_parser.hpp>

Public Functions

nlohmann::json JsonParser::parse(PyObject *dictionary)

Private Types

enum type JsonParser::Type

Values:

Private Functions

std::string JsonParser::py23_string_to_ascii_string(PyObject *py_str)
Type JsonParser::getType(PyObject *object)
void JsonParser::push_value(nlohmann::json &arr, PyObject *value)
nlohmann::json JsonParser::parse_list(PyObject *list)
nlohmann::json JsonParser::parse_tuple(PyObject *tuple)
void JsonParser::parse_dict(nlohmann::json &json, PyObject *dict)
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::label::label(nlohmann::json config)
virtual nervana::provider::label::~label()
void provider::label::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation&) const

Private Members

nervana::label::config nervana::provider::label::m_config
nervana::label::extractor nervana::provider::label::m_extractor
nervana::label::loader nervana::provider::label::m_loader
const std::string nervana::provider::label::m_buffer_name
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::label_map::label_map(nlohmann::json js)
virtual nervana::provider::label_map::~label_map()
void provider::label_map::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation&) const

Private Functions

nervana::provider::label_map::label_map()

Private Members

nervana::label_map::config nervana::provider::label_map::m_config
nervana::label_map::extractor nervana::provider::label_map::m_extractor
nervana::label_map::loader nervana::provider::label_map::m_loader
const std::string nervana::provider::label_map::m_buffer_name
class
#include <etl_char_map.hpp>

Inherits from nervana::interface::loader< char_map::decoded >

Public Functions

nervana::char_map::loader::loader(const char_map::config &cfg)
virtual nervana::char_map::loader::~loader()
void char_map::loader::load(const std::vector<void *>&, std::shared_ptr<char_map::decoded>) const

Private Members

const bool nervana::char_map::loader::_emit_length
class
#include <etl_depthmap.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

nervana::depthmap::loader::loader(const image::config &cfg)
nervana::depthmap::loader::~loader()
void depthmap::loader::load(const std::vector<void *>&, std::shared_ptr<image::decoded>) const

Private Functions

void nervana::depthmap::loader::split(cv::Mat&, char *)

Private Members

const image::config &nervana::depthmap::loader::_cfg
class
#include <etl_image.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

image::loader::loader(const image::config &cfg, bool fixed_aspect_ratio)
nervana::image::loader::~loader()
void image::loader::load(const std::vector<void *>&, std::shared_ptr<image::decoded>) const

Private Functions

void nervana::image::loader::split(cv::Mat&, char *)

Private Members

bool nervana::image::loader::m_channel_major
bool nervana::image::loader::m_fixed_aspect_ratio
shape_type nervana::image::loader::m_stype
uint32_t nervana::image::loader::m_channels
class
#include <etl_label.hpp>

Inherits from nervana::interface::loader< label::decoded >

Public Functions

nervana::label::loader::loader(const label::config &cfg)
nervana::label::loader::~loader()
void nervana::label::loader::load(const std::vector<void *> &buflist, std::shared_ptr<label::decoded> mp) const

Private Members

const label::config &nervana::label::loader::_cfg
class
#include <etl_label_map.hpp>

Inherits from nervana::interface::loader< label_map::decoded >

Public Functions

loader::loader(const label_map::config &cfg)
virtual nervana::label_map::loader::~loader()
virtual void nervana::label_map::loader::load(const std::vector<void *>&, std::shared_ptr<label_map::decoded>) const

Private Members

int nervana::label_map::loader::max_label_count
class
#include <etl_video.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

nervana::video::loader::loader(const video::config &cfg)
virtual nervana::video::loader::~loader()
void video::loader::load(const std::vector<void *>&, std::shared_ptr<image::decoded>) const

Private Functions

nervana::video::loader::loader()
class
#include <etl_audio.hpp>

Inherits from nervana::interface::loader< audio::decoded >

Public Functions

nervana::audio::loader::loader(const audio::config &cfg)
nervana::audio::loader::~loader()
void audio::loader::load(const std::vector<void *>&, std::shared_ptr<audio::decoded>) const

Private Members

const audio::config &nervana::audio::loader::_cfg
template <typename T>
class
#include <interface.hpp>

Public Functions

virtual nervana::interface::loader::~loader()
virtual void nervana::interface::loader::load(const std::vector<void *>&, std::shared_ptr<T>) const
= 0
class
#include <etl_localization_rcnn.hpp>

Inherits from nervana::interface::loader< localization::rcnn::decoded >

Public Functions

localization::rcnn::loader::loader(const localization::rcnn::config &cfg)
virtual nervana::localization::rcnn::loader::~loader()
void localization::rcnn::loader::load(const std::vector<void *> &buf_list, std::shared_ptr<localization::rcnn::decoded> mp) const

Private Functions

nervana::localization::rcnn::loader::loader()

Private Members

int nervana::localization::rcnn::loader::total_anchors
size_t nervana::localization::rcnn::loader::max_gt_boxes
std::vector<shape_type> nervana::localization::rcnn::loader::shape_type_list
class
#include <etl_blob.hpp>

Inherits from nervana::interface::loader< blob::decoded >

Public Functions

nervana::blob::loader::loader(const blob::config &cfg)
nervana::blob::loader::~loader()
void nervana::blob::loader::load(const std::vector<void *> &buflist, std::shared_ptr<blob::decoded> mp) const
class
#include <loader.hpp>

Subclassed by nervana::loader_local

Public Types

enum type nervana::loader::BatchMode

Values:

Public Functions

virtual nervana::loader::~loader()
virtual const std::vector<std::string> &nervana::loader::get_buffer_names() const
= 0
virtual const std::vector<std::pair<std::string, shape_type>> &nervana::loader::get_names_and_shapes() const
= 0
virtual const shape_t &nervana::loader::get_shape(const std::string &name) const
= 0
virtual int nervana::loader::record_count() const
= 0
virtual int nervana::loader::batch_size() const
= 0
virtual int nervana::loader::batch_count() const
= 0
virtual iterator nervana::loader::begin()
= 0
virtual iterator nervana::loader::end()
= 0
virtual iterator &nervana::loader::get_current_iter()
= 0
virtual iterator &nervana::loader::get_end_iter()
= 0
virtual const fixed_buffer_map *nervana::loader::get_output_buffer() const
= 0
virtual const size_t &nervana::loader::position()
= 0
virtual void nervana::loader::reset()
= 0
virtual nlohmann::json nervana::loader::get_current_config() const
= 0
virtual const char *nervana::loader::get_session_id() const
= 0

Protected Functions

virtual void nervana::loader::increment_position()
= 0
class
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::loader< nervana::boundingbox::decoded >

Public Functions

boundingbox::loader::loader(const boundingbox::config &cfg)
virtual nervana::boundingbox::loader::~loader()
void boundingbox::loader::load(const std::vector<void *>&, std::shared_ptr<boundingbox::decoded>) const

Private Members

const size_t nervana::boundingbox::loader::max_bbox
class
#include <etl_localization_ssd.hpp>

Inherits from nervana::interface::loader< ssd::decoded >

Public Functions

localization::ssd::loader::loader(const ssd::config &cfg)
virtual nervana::localization::ssd::loader::~loader()
void localization::ssd::loader::load(const std::vector<void *> &buf_list, std::shared_ptr<ssd::decoded> mp) const

Private Functions

nervana::localization::ssd::loader::loader()

Private Members

size_t nervana::localization::ssd::loader::max_gt_boxes
class
#include <loader.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::loader_config::loader_config(nlohmann::json js)

Public Members

std::string nervana::loader_config::manifest_filename
std::string nervana::loader_config::manifest_root
int nervana::loader_config::batch_size
std::string nervana::loader_config::cache_directory
int nervana::loader_config::block_size
float nervana::loader_config::subset_fraction
bool nervana::loader_config::shuffle_enable
bool nervana::loader_config::shuffle_manifest
bool nervana::loader_config::pinned
bool nervana::loader_config::batch_major
uint32_t nervana::loader_config::random_seed
uint32_t nervana::loader_config::decode_thread_count
std::string nervana::loader_config::iteration_mode
int nervana::loader_config::iteration_mode_count
uint16_t nervana::loader_config::web_server_port
std::vector<nlohmann::json> nervana::loader_config::etl
std::vector<nlohmann::json> nervana::loader_config::augmentation

Private Functions

nervana::loader_config::loader_config()
void loader_config::validate()

Private Members

std::vector<std::shared_ptr<nervana::interface::config_info_interface>> nervana::loader_config::config_list
class
#include <loader.hpp>

Public Functions

std::unique_ptr<loader> loader_factory::get_loader(const std::string &config)
std::unique_ptr<loader> nervana::loader_factory::get_loader(const nlohmann::json &config)
class
#include <loader.hpp>

Inherits from nervana::loader

Public Functions

loader_local::loader_local(const std::string &config_string)
nervana::loader_local::loader_local(const nlohmann::json&)
loader_local::~loader_local()
const vector<string> &loader_local::get_buffer_names() const
const vector<pair<string, shape_type>> &loader_local::get_names_and_shapes() const
const shape_t &loader_local::get_shape(const std::string &name) const
int nervana::loader_local::record_count() const
int nervana::loader_local::batch_size() const
int nervana::loader_local::batch_count() const
iterator nervana::loader_local::begin()
iterator nervana::loader_local::end()
iterator &nervana::loader_local::get_current_iter()
iterator &nervana::loader_local::get_end_iter()
const fixed_buffer_map *nervana::loader_local::get_output_buffer() const
const size_t &nervana::loader_local::position()
void nervana::loader_local::reset()
nlohmann::json nervana::loader_local::get_current_config() const
const char *nervana::loader_local::get_session_id() const

Private Functions

nervana::loader_local::loader_local()
void loader_local::initialize(const nlohmann::json &config_json)
void loader_local::increment_position()

Private Members

iterator nervana::loader_local::m_current_iter
iterator nervana::loader_local::m_end_iter
std::shared_ptr<manifest_file> nervana::loader_local::m_manifest_file
std::shared_ptr<manifest_nds> nervana::loader_local::m_manifest_nds
std::shared_ptr<block_loader_source> nervana::loader_local::m_block_loader
std::shared_ptr<block_manager> nervana::loader_local::m_block_manager
std::shared_ptr<batch_iterator> nervana::loader_local::m_batch_iterator
std::shared_ptr<provider_interface> nervana::loader_local::m_provider
std::shared_ptr<batch_decoder> nervana::loader_local::m_decoder
std::shared_ptr<async_manager_source<fixed_buffer_map>> nervana::loader_local::m_final_stage
int nervana::loader_local::m_batch_size
BatchMode nervana::loader_local::m_batch_mode
int nervana::loader_local::m_batch_count_value
size_t nervana::loader_local::m_position
fixed_buffer_map *nervana::loader_local::m_output_buffer_ptr
nlohmann::json nervana::loader_local::m_current_config
std::shared_ptr<web_app> nervana::loader_local::m_debug_web_app
const int nervana::loader_local::m_input_multiplier

Friends

friend nervana::loader_local::nervana::loader::iterator
class
#include <log.hpp>

Public Functions

nervana::log_helper::log_helper(log_level level, const char *file, int line, const char *func)
nervana::log_helper::~log_helper()
std::ostream &nervana::log_helper::stream()

Private Functions

nervana::log_level nervana::log_helper::get_log_level()
bool nervana::log_helper::log_to_be_printed()

Private Members

std::stringstream nervana::log_helper::_stream
log_level nervana::log_helper::_level
class
#include <log.hpp>

Public Static Functions

static void nervana::logger::set_log_path(const std::string &path)
void nervana::logger::start()
void nervana::logger::stop()

Private Static Functions

void nervana::logger::log_item(const std::string &s)
void nervana::logger::process_event(const std::string &s)
void nervana::logger::thread_entry(void *param)

Private Static Attributes

deque<string> nervana::logger::queue

Friends

friend nervana::logger::log_helper
class
#include <manifest.hpp>

Subclassed by nervana::manifest_file, nervana::manifest_nds

Public Types

enum type nervana::manifest::element_t

Values:

Public Functions

nervana::manifest::manifest()
virtual nervana::manifest::~manifest()
virtual std::string nervana::manifest::cache_id()
= 0
virtual std::string nervana::manifest::version()
= 0
void nervana::manifest::set_block_load_sequence(const std::vector<std::pair<size_t, size_t>> &seq)

Protected Functions

nervana::manifest::manifest(const manifest&)

Protected Attributes

std::vector<std::pair<size_t, size_t>> nervana::manifest::m_block_load_sequence
class
#include <manifest_file.hpp>

Inherits from nervana::async_manager_source< std::vector< std::vector< std::string > > >, nervana::manifest

Public Types

typedef

Public Functions

nervana::manifest_file::manifest_file(const std::string &filename, bool shuffle, const std::string &root = "", float subset_fraction = 1.0, size_t block_size = 5000, uint32_t seed = 0)
manifest_file::manifest_file(std::istream &stream, bool shuffle, const std::string &root = "", float subset_fraction = 1.0, size_t block_size = 5000, uint32_t seed = 0)
virtual nervana::manifest_file::~manifest_file()
string manifest_file::cache_id()
string manifest_file::version()
vector<vector<string>> *manifest_file::next()
void manifest_file::reset()
size_t nervana::manifest_file::block_count() const
size_t nervana::manifest_file::record_count() const
size_t nervana::manifest_file::elements_per_record() const
uint32_t manifest_file::get_crc()
const std::vector<manifest_file::element_t> &manifest_file::get_element_types() const
const std::vector<std::string> &manifest_file::operator[](size_t offset) const

Public Static Functions

static char nervana::manifest_file::get_delimiter()
static char nervana::manifest_file::get_comment_char()
static char nervana::manifest_file::get_metadata_char()
static const std::string &nervana::manifest_file::get_file_type_id()
static const std::string &nervana::manifest_file::get_binary_type_id()
static const std::string &nervana::manifest_file::get_string_type_id()
static const std::string &nervana::manifest_file::get_ascii_int_type_id()
static const std::string &nervana::manifest_file::get_ascii_float_type_id()

Protected Functions

void manifest_file::initialize(std::istream &stream, size_t block_size, const std::string &root, float subset_fraction)

Private Functions

void manifest_file::generate_subset(std::vector<std::vector<std::string>>&, float subset_fraction)

Private Members

std::string nervana::manifest_file::m_source_filename
std::vector<std::vector<record>> nervana::manifest_file::m_block_list
CryptoPP::CRC32C nervana::manifest_file::m_crc_engine
uint32_t nervana::manifest_file::m_computed_crc
size_t nervana::manifest_file::m_counter
size_t nervana::manifest_file::m_record_count
std::vector<element_t> nervana::manifest_file::m_element_types
std::vector<size_t> nervana::manifest_file::m_block_load_sequence
bool nervana::manifest_file::m_shuffle
std::minstd_rand0 nervana::manifest_file::m_random

Private Static Attributes

const char nervana::manifest_file::m_delimiter_char
const char nervana::manifest_file::m_comment_char
const char nervana::manifest_file::m_metadata_char
const string manifest_file::m_file_type_id
const string manifest_file::m_binary_type_id
const string manifest_file::m_string_type_id
const string manifest_file::m_ascii_int_type_id
const string manifest_file::m_ascii_float_type_id
class
#include <manifest_nds.hpp>

Inherits from nervana::async_manager_source< encoded_record_list >, nervana::manifest

Public Functions

nervana::manifest_nds::manifest_nds(const manifest_nds&)
virtual nervana::manifest_nds::~manifest_nds()
encoded_record_list *manifest_nds::next()
void nervana::manifest_nds::reset()
size_t nervana::manifest_nds::record_count() const
size_t nervana::manifest_nds::elements_per_record() const
size_t nervana::manifest_nds::block_count() const
encoded_record_list *manifest_nds::load_block(size_t block_index)
string manifest_nds::cache_id()
std::string nervana::manifest_nds::version()

Public Static Functions

bool manifest_nds::is_likely_json(const std::string filename)

Private Functions

void manifest_nds::load_metadata()
nervana::manifest_nds::manifest_nds()
manifest_nds::manifest_nds(const std::string &base_url, const std::string &token, size_t collection_id, size_t block_size, size_t elements_per_record, size_t shard_count, size_t shard_index, bool shuffle, uint32_t seed = 0)

Private Members

const std::string nervana::manifest_nds::m_base_url
const std::string nervana::manifest_nds::m_token
const size_t nervana::manifest_nds::m_collection_id
const size_t nervana::manifest_nds::m_elements_per_record
size_t nervana::manifest_nds::m_record_count
size_t nervana::manifest_nds::m_block_count
network_client nervana::manifest_nds::m_network_client
size_t nervana::manifest_nds::m_current_block_number
std::vector<size_t> nervana::manifest_nds::m_block_load_sequence
encoded_record_list nervana::manifest_nds::m_current_block
bool nervana::manifest_nds::m_shuffle
std::minstd_rand0 nervana::manifest_nds::m_rnd

Private Static Functions

size_t manifest_nds::write_data(void *ptr, size_t size, size_t nmemb, void *stream)

Friends

friend nervana::manifest_nds::manifest_nds_builder
class
#include <manifest_nds.hpp>

Public Functions

manifest_nds_builder &manifest_nds_builder::filename(const std::string &filename)
manifest_nds_builder &manifest_nds_builder::base_url(const std::string &url)
manifest_nds_builder &manifest_nds_builder::token(const std::string &token)
manifest_nds_builder &manifest_nds_builder::collection_id(size_t collection_id)
manifest_nds_builder &manifest_nds_builder::block_size(size_t block_size)
manifest_nds_builder &manifest_nds_builder::elements_per_record(size_t elements_per_record)
manifest_nds_builder &manifest_nds_builder::shard_count(size_t shard_count)
manifest_nds_builder &manifest_nds_builder::shard_index(size_t shard_index)
manifest_nds_builder &manifest_nds_builder::shuffle(bool enable)
manifest_nds_builder &manifest_nds_builder::seed(uint32_t seed)
manifest_nds manifest_nds_builder::create()
std::shared_ptr<manifest_nds> manifest_nds_builder::make_shared()

Private Functions

void manifest_nds_builder::parse_json(const std::string &filename)

Private Members

std::string nervana::manifest_nds_builder::m_base_url
std::string nervana::manifest_nds_builder::m_token
size_t nervana::manifest_nds_builder::m_collection_id
size_t nervana::manifest_nds_builder::m_block_size
size_t nervana::manifest_nds_builder::m_elements_per_record
size_t nervana::manifest_nds_builder::m_shard_count
size_t nervana::manifest_nds_builder::m_shard_index
size_t nervana::manifest_nds_builder::m_shuffle
uint32_t nervana::manifest_nds_builder::m_seed
class
#include <util.hpp>

Inherits from istream

Public Functions

nervana::memory_stream::memory_stream(char *data, size_t size)

Private Members

memstream<char> nervana::memory_stream::wrapper
template <typename CharT, typename TraitsT = std::char_traits<CharT>>
class
#include <util.hpp>

Inherits from std::basic_streambuf< CharT, TraitsT >

Public Functions

nervana::memstream::memstream(CharT *data, size_t size)
std::ios::pos_type nervana::memstream::seekoff(std::ios::off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which)
std::ios::pos_type nervana::memstream::seekpos(std::ios::pos_type pos, std::ios_base::openmode which)
class
#include <cap_mjpeg_decoder.hpp>

Public Functions

nervana::MotionJpegCapture::MotionJpegCapture(const std::string&)
nervana::MotionJpegCapture::MotionJpegCapture(char *buffer, size_t size)
nervana::MotionJpegCapture::~MotionJpegCapture()
double nervana::MotionJpegCapture::getProperty(int property) const
bool nervana::MotionJpegCapture::setProperty(int property, double value)
bool nervana::MotionJpegCapture::grabFrame()
bool nervana::MotionJpegCapture::retrieveFrame(int, cv::Mat &output_frame)
bool nervana::MotionJpegCapture::isOpened() const
virtual int nervana::MotionJpegCapture::getCaptureDomain()
bool nervana::MotionJpegCapture::open()
void nervana::MotionJpegCapture::close()

Protected Functions

bool nervana::MotionJpegCapture::parseRiff(std::istream &in_str)
uint64_t nervana::MotionJpegCapture::getFramePos() const
std::vector<char> nervana::MotionJpegCapture::readFrame(frame_iterator it)

Protected Attributes

std::shared_ptr<std::istream> nervana::MotionJpegCapture::m_file_stream
bool nervana::MotionJpegCapture::m_is_first_frame
frame_list nervana::MotionJpegCapture::m_mjpeg_frames
frame_iterator nervana::MotionJpegCapture::m_frame_iterator
cv::Mat nervana::MotionJpegCapture::m_current_frame
uint32_t nervana::MotionJpegCapture::m_frame_width
uint32_t nervana::MotionJpegCapture::m_frame_height
double nervana::MotionJpegCapture::m_fps
class
#include <manifest_nds.hpp>

Public Functions

network_client::network_client(const std::string &baseurl, const std::string &token, size_t collection_id, size_t block_size, size_t shard_count, size_t shard_index)
nervana::network_client::network_client(const network_client&)
network_client::~network_client()
void network_client::get(const std::string &url, std::stringstream &stream)
string network_client::load_block_url(size_t block_num)
string network_client::metadata_url()

Public Static Functions

size_t network_client::callback(void *ptr, size_t size, size_t nmemb, void *stream)

Private Members

const std::string nervana::network_client::m_baseurl
const std::string nervana::network_client::m_token
const int nervana::network_client::m_collection_id
const int nervana::network_client::m_shard_count
const int nervana::network_client::m_shard_index
uint32_t nervana::network_client::m_macrobatch_size
class
#include <noise_clips.hpp>

Public Functions

noise_clips::noise_clips(const std::string noiseIndexFile, const std::string noiseRoot)
noise_clips::~noise_clips()
void noise_clips::addNoise(cv::Mat &wav_mat, bool add_noise, uint32_t noise_index, float noise_offset_fraction, float noise_level)

Add noise to a sound waveform.

Private Functions

void noise_clips::load_index(const std::string &index_file, const std::string &root_dir)
void noise_clips::load_data()
void noise_clips::read_noise(std::string &noise_file, int *dataLen)

Private Members

std::vector<cv::Mat> nervana::noise_clips::_noise_data
std::vector<std::string> nervana::noise_clips::_noise_files
char *nervana::noise_clips::_buf
int nervana::noise_clips::_bufLen
class
#include <typemap.hpp>

Public Functions

nervana::output_type::output_type()
nervana::output_type::output_type(const std::string &r)
bool nervana::output_type::valid() const
int nervana::output_type::get_cv_type() const
int nervana::output_type::get_np_type() const
size_t nervana::output_type::get_size() const
bool nervana::output_type::operator==(const output_type &other) const
bool nervana::output_type::operator!=(const output_type &other) const

Public Members

std::string nervana::output_type::m_tp_name
int nervana::output_type::m_np_type
int nervana::output_type::m_cv_type
size_t nervana::output_type::m_size

Public Static Functions

static bool nervana::output_type::is_valid_type(const std::string &s)

Private Static Attributes

const std::string nervana::output_type::m_tp_name_json_name
const std::string nervana::output_type::m_np_type_json_name
const std::string nervana::output_type::m_cv_type_json_name
const std::string nervana::output_type::m_size_json_name

Friends

void to_json(nlohmann::json &out, const nervana::output_type &obj)
void from_json(const nlohmann::json &js, nervana::output_type &obj)
class
#include <web_server.hpp>

Public Types

typedef

Public Functions

web::page::~page()
void web::page::initialize(std::shared_ptr<web::tcp::connection> connection)
bool web::page::puts(const std::string &string)
bool web::page::send_string(const std::string &string)
bool web::page::raw_send(const void *buffer, size_t length)
void web::page::send_ascii_string(const std::string &string)
void web::page::dump_data(const char *buffer, size_t length)
bool web::page::send_file(const std::string &filename)
bool web::page::send_as_file(const char *buffer, size_t length)
void web::page::page_ok(const char *mimeType = "text/html")
void web::page::page_not_found()
void web::page::page_no_content()
void web::page::page_unauthorized()
void web::page::master_page_file(const std::string &path, const std::string &marker, marker_content)
void web::page::master_page_string(const std::string &path, const std::string &marker, marker_content)
void web::page::flush()
const std::map<std::string, std::string> &web::page::args() const
const std::string &web::page::content_type() const
size_t web::page::content_length() const
web::tcp::connection &web::page::connection()
web::page::page()
std::ostream &web::page::output_stream()
std::istream &web::page::input_stream()

Public Static Functions

string web::page::html_encode(const std::string &s)

Private Functions

web::page::page(page&)
void web::page::close_pending_open()
size_t web::page::get_file_size(const std::string &filename)

Private Members

std::string web::page::m_url
std::string web::page::m_content_type
int web::page::m_content_length
std::map<std::string, std::string> web::page::m_args
std::shared_ptr<web::tcp::connection> web::page::m_connection
std::thread web::page::m_thread
server *web::page::m_server
bool web::page::m_http_header_sent

Friends

friend web::page::server
class
#include <augment_image.hpp>

Inherits from nervana::json_configurable

Public Functions

augment::image::param_factory::param_factory(nlohmann::json config)
shared_ptr<augment::image::params> augment::image::param_factory::make_params(size_t input_width, size_t input_height, size_t output_width, size_t output_height) const
shared_ptr<augment::image::params> augment::image::param_factory::make_ssd_params(size_t input_width, size_t input_height, size_t output_width, size_t output_height, const std::vector<nervana::boundingbox::box> &object_bboxes) const

Public Members

bool nervana::augment::image::param_factory::do_area_scale
bool nervana::augment::image::param_factory::crop_enable
bool nervana::augment::image::param_factory::fixed_aspect_ratio
float nervana::augment::image::param_factory::expand_probability
float nervana::augment::image::param_factory::fixed_scaling_factor
std::string nervana::augment::image::param_factory::m_emit_constraint_type
float nervana::augment::image::param_factory::m_emit_constraint_min_overlap
std::uniform_real_distribution<float> nervana::augment::image::param_factory::scale

Scale the crop box (width, height)

std::uniform_int_distribution<int> nervana::augment::image::param_factory::angle

Rotate the image (rho, phi)

std::normal_distribution<float> nervana::augment::image::param_factory::lighting

Adjust lighting

std::uniform_real_distribution<float> nervana::augment::image::param_factory::horizontal_distortion

Adjust aspect ratio

std::uniform_real_distribution<float> nervana::augment::image::param_factory::contrast

Adjust contrast

std::uniform_real_distribution<float> nervana::augment::image::param_factory::brightness

Adjust brightness

std::uniform_real_distribution<float> nervana::augment::image::param_factory::saturation

Adjust saturation

std::uniform_real_distribution<float> nervana::augment::image::param_factory::expand_ratio

Expand image

std::uniform_real_distribution<float> nervana::augment::image::param_factory::expand_distribution
std::uniform_int_distribution<int> nervana::augment::image::param_factory::hue

Rotate hue in degrees. Valid values are [-180; 180]

std::uniform_real_distribution<float> nervana::augment::image::param_factory::crop_offset

Offset from center for the crop

std::bernoulli_distribution nervana::augment::image::param_factory::flip_distribution

Flip the image left to right

int nervana::augment::image::param_factory::padding

Image padding pixel number with random crop to original image size

std::string nervana::augment::image::param_factory::debug_output_directory

Writes transformed data to the provided directory

std::vector<nlohmann::json> nervana::augment::image::param_factory::batch_samplers

Private Functions

nbox augment::image::param_factory::sample_patch(const std::vector<nervana::normalized_box::box> &normalized_object_bboxes) const
emit_type augment::image::param_factory::get_emit_constraint_type()

Private Members

bool nervana::augment::image::param_factory::flip_enable
bool nervana::augment::image::param_factory::center
emit_type nervana::augment::image::param_factory::m_emit_type
std::uniform_int_distribution<int> nervana::augment::image::param_factory::padding_crop_offset_distribution

Offset for padding cropbox

std::vector<batch_sampler> nervana::augment::image::param_factory::m_batch_samplers
std::vector<std::shared_ptr<interface::config_info_interface>> nervana::augment::image::param_factory::config_list
template <typename T, typename S>
class
#include <interface.hpp>

Public Functions

virtual nervana::interface::param_factory::~param_factory()
virtual std::shared_ptr<S> nervana::interface::param_factory::make_params(std::shared_ptr<const T>)
= 0
class
#include <augment_audio.hpp>

Inherits from nervana::json_configurable

Public Functions

nervana::augment::audio::param_factory::param_factory(nlohmann::json config)
shared_ptr<augment::audio::params> augment::audio::param_factory::make_params() const

Public Members

std::bernoulli_distribution nervana::augment::audio::param_factory::add_noise

Probability of adding noise

std::uniform_int_distribution<uint32_t> nervana::augment::audio::param_factory::noise_index

Index into noise index file

std::uniform_real_distribution<float> nervana::augment::audio::param_factory::noise_offset_fraction

Offset from start of noise file

std::uniform_real_distribution<float> nervana::augment::audio::param_factory::time_scale_fraction

Simple linear time-warping

std::uniform_real_distribution<float> nervana::augment::audio::param_factory::noise_level

How much noise to add (a value of 1 would be 0 dB SNR)

Private Members

float nervana::augment::audio::param_factory::add_noise_probability
std::vector<std::shared_ptr<interface::config_info_interface>> nervana::augment::audio::param_factory::config_list
class
#include <augment_audio.hpp>

Inherits from nervana::interface::params

Public Members

bool nervana::augment::audio::params::add_noise
uint32_t nervana::augment::audio::params::noise_index
float nervana::augment::audio::params::noise_level
float nervana::augment::audio::params::noise_offset_fraction
float nervana::augment::audio::params::time_scale_fraction

Private Functions

nervana::augment::audio::params::params()

Friends

friend nervana::augment::audio::params::nervana::augment::audio::param_factory
std::ostream &operator<<(std::ostream &out, const params &obj)
class
#include <etl_label_map.hpp>

Inherits from nervana::interface::params

Public Functions

nervana::label_map::params::params()
class
#include <interface.hpp>

Subclassed by nervana::augment::audio::params, nervana::label_map::params

Public Functions

virtual nervana::interface::params::~params()
class
#include <augment_image.hpp>

Public Members

float nervana::augment::image::params::expand_ratio
cv::Size2i nervana::augment::image::params::expand_offset
cv::Size2i nervana::augment::image::params::expand_size
emit_type nervana::augment::image::params::emit_constraint_type
float nervana::augment::image::params::emit_min_overlap
cv::Rect nervana::augment::image::params::cropbox
cv::Size2i nervana::augment::image::params::output_size
int nervana::augment::image::params::angle
bool nervana::augment::image::params::flip
int nervana::augment::image::params::padding
cv::Size2i nervana::augment::image::params::padding_crop_offset
std::vector<float> nervana::augment::image::params::lighting
float nervana::augment::image::params::color_noise_std
float nervana::augment::image::params::contrast
float nervana::augment::image::params::brightness
float nervana::augment::image::params::saturation
int nervana::augment::image::params::hue
bool nervana::augment::image::params::debug_deterministic
std::string nervana::augment::image::params::debug_output_directory

Private Functions

nervana::augment::image::params::params()

Friends

friend nervana::augment::image::params::nervana::augment::image::param_factory
std::ostream &operator<<(std::ostream &out, const params &obj)
class
#include <image.hpp>

Public Functions

image::photometric::photometric()

Public Static Functions

void image::photometric::lighting(cv::Mat &inout, std::vector<float>, float color_noise_std)
void image::photometric::cbsjitter(cv::Mat &inout, float contrast, float brightness, float saturation, int hue = 0)
static void nervana::image::photometric::transform_hsv(cv::Mat &image, const float h_gain, const float s_gain, const float v_gain)

Public Static Attributes

const float image::photometric::_CPCA
const cv::Mat image::photometric::CPCA
const cv::Mat image::photometric::CSTD
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::pixelmask::pixelmask(nlohmann::json js, nlohmann::json aug)
virtual nervana::provider::pixelmask::~pixelmask()
void provider::pixelmask::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation &aug) const

Private Members

nervana::image::config nervana::provider::pixelmask::m_config
nervana::pixel_mask::extractor nervana::provider::pixelmask::m_extractor
nervana::pixel_mask::transformer nervana::provider::pixelmask::m_transformer
nervana::augment::image::param_factory nervana::provider::pixelmask::m_augmentation_factory
nervana::image::loader nervana::provider::pixelmask::m_loader
const std::string nervana::provider::pixelmask::m_buffer_name
class
#include <provider.hpp>

Inherits from nervana::provider_interface

Public Functions

provider::provider_base::provider_base(nlohmann::json js, const std::vector<nlohmann::json> &etl, nlohmann::json augmentation)
void provider::provider_base::provide(int idx, encoded_record_list &in_buf, fixed_buffer_map &out_buf) const

Private Members

std::vector<std::shared_ptr<provider::interface>> nervana::provider::provider_base::m_providers
class
#include <provider_factory.hpp>

Inherits from nervana::interface::config

Public Functions

nervana::provider_config::provider_config(nlohmann::json js)

Public Members

std::vector<nlohmann::json> nervana::provider_config::etl
std::vector<nlohmann::json> nervana::provider_config::augmentation

Private Members

std::vector<std::shared_ptr<nervana::interface::config_info_interface>> nervana::provider_config::config_list
class
#include <provider_factory.hpp>

Public Functions

virtual nervana::provider_factory::~provider_factory()

Public Static Functions

shared_ptr<nervana::provider_interface> nervana::provider_factory::create(nlohmann::json configJs)
shared_ptr<nervana::provider_interface> nervana::provider_factory::clone(const std::shared_ptr<nervana::provider_interface> &r)
class
#include <provider_interface.hpp>

Subclassed by nervana::provider::interface, nervana::provider::provider_base

Public Functions

nervana::provider_interface::provider_interface(nlohmann::json js, size_t input_count)
virtual nervana::provider_interface::~provider_interface()
virtual void nervana::provider_interface::provide(int idx, nervana::encoded_record_list &in_buf, nervana::fixed_buffer_map &out_buf) const
= 0
size_t nervana::provider_interface::get_input_count() const
virtual void nervana::provider_interface::post_process(fixed_buffer_map &out_buf)
const shape_type &nervana::provider_interface::get_output_shape(const std::string &name) const
const std::vector<std::pair<std::string, shape_type>> &nervana::provider_interface::get_output_shapes() const
nlohmann::json nervana::provider_interface::get_config()
const std::vector<std::string> &nervana::provider_interface::get_buffer_names()

Protected Attributes

std::vector<std::pair<std::string, shape_type>> nervana::provider_interface::m_output_shapes
std::vector<std::string> nervana::provider_interface::m_buffer_names
nlohmann::json nervana::provider_interface::m_js
size_t nervana::provider_interface::m_input_count
class
#include <raw_image.hpp>

Public Functions

nervana::raw_image::raw_image(const std::string &filename)
raw_image::raw_image(std::istream &in_stream)
void nervana::raw_image::write(const std::string &filename)
void nervana::raw_image::write(std::ostream &out_stream)
cv::Mat raw_image::to_cvmat()
size_t raw_image::size() const

Public Static Functions

raw_image raw_image::from_cvmat(cv::Mat &mat)

Private Functions

raw_image::raw_image()
void raw_image::read(std::istream &in)
bool raw_image::to_bool(const std::string &s) const

Private Members

std::shared_ptr<char> nervana::raw_image::m_data
size_t nervana::raw_image::m_width
size_t nervana::raw_image::m_height
size_t nervana::raw_image::m_channels
size_t nervana::raw_image::m_bitwidth
bool nervana::raw_image::m_is_float
bool nervana::raw_image::m_is_big_endian
class
#include <provider.hpp>

Inherits from nervana::provider::interface

Public Functions

provider::localization::rcnn::rcnn(nlohmann::json js, nlohmann::json aug)
virtual nervana::provider::localization::rcnn::~rcnn()
void provider::localization::rcnn::provide(int idx, const std::vector<char> &datum_in, nervana::fixed_buffer_map &out_buf, augmentation &aug) const

Private Members

nervana::localization::rcnn::config nervana::provider::localization::rcnn::m_config
nervana::augment::image::param_factory nervana::provider::localization::rcnn::m_augmentation_factory
nervana::localization::rcnn::extractor nervana::provider::localization::rcnn::m_extractor
nervana::localization::rcnn::transformer nervana::provider::localization::rcnn::m_transformer
nervana::localization::rcnn::loader nervana::provider::localization::rcnn::m_loader
const std::string nervana::provider::localization::rcnn::m_bbtargets_buffer_name
const std::string nervana::provider::localization::rcnn::m_bbtargets_mask_buffer_name
const std::string nervana::provider::localization::rcnn::m_labels_flat_buffer_name
const std::string nervana::provider::localization::rcnn::m_labels_mask_buffer_name
const std::string nervana::provider::localization::rcnn::m_image_shape_buffer_name
const std::string nervana::provider::localization::rcnn::m_gt_boxes_buffer_name
const std::string nervana::provider::localization::rcnn::m_gt_box_count_buffer_name
const std::string nervana::provider::localization::rcnn::m_gt_class_count_buffer_name
const std::string nervana::provider::localization::rcnn::m_image_scale_buffer_name
const std::string nervana::provider::localization::rcnn::m_difficult_flag_buffer_name
class
#include <cpio.hpp>

Public Functions

cpio::reader::reader(std::istream &is)
cpio::reader::~reader()
void cpio::reader::close()
void cpio::reader::read(nervana::encoded_record_list &dest, size_t element_count)
std::string nervana::cpio::reader::read(std::vector<char> &dest)
int cpio::reader::record_count()

Protected Functions

void cpio::reader::read_header()

Protected Attributes

std::istream &nervana::cpio::reader::m_is
file_header nervana::cpio::reader::m_header
file_trailer nervana::cpio::reader::m_trailer
record_header nervana::cpio::reader::m_record_header
class
#include <cpio.hpp>

Public Functions

cpio::record_header::record_header()
void cpio::record_header::load_double_short(uint32_t *dst, uint16_t src[2])
void cpio::record_header::save_double_short(uint16_t *dst, uint32_t src)
void cpio::record_header::read(std::istream &ifs, uint32_t *fileSize)
void cpio::record_header::write(std::ostream &ofs, uint32_t fileSize, const char *fileName)

Public Members

uint16_t nervana::cpio::record_header::m_magic
uint16_t nervana::cpio::record_header::m_dev
uint16_t nervana::cpio::record_header::m_ino
uint16_t nervana::cpio::record_header::m_mode
uint16_t nervana::cpio::record_header::m_uid
uint16_t nervana::cpio::record_header::m_gid
uint16_t nervana::cpio::record_header::m_nlink
uint16_t nervana::cpio::record_header::m_rdev
uint16_t nervana::cpio::record_header::m_mtime[2]