Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
movidius_ncs_lib::Tensor Class Reference

#include <tensor.h>

Public Types

using ConstPtr = std::shared_ptr< Tensor const >
 
using Ptr = std::shared_ptr< Tensor >
 

Public Member Functions

void clearTensor ()
 
int getImageHeight ()
 
int getImageWidth ()
 
void loadImageData (const cv::Mat &image)
 
const uint16_t * raw () const
 
const size_t size () const
 
 Tensor (const std::pair< int, int > &net_dim, const std::vector< float > &mean, const float &scale)
 

Static Public Member Functions

static void fp16tofp32 (float *__restrict out, uint16_t in)
 
static void fp32tofp16 (uint16_t *__restrict out, float in)
 

Private Attributes

int image_height_
 
int image_width_
 
std::vector< float > mean_
 
int net_height_
 
int net_width_
 
float scale_
 
std::vector< uint16_t > tensor_
 

Detailed Description

Definition at line 29 of file tensor.h.

Member Typedef Documentation

using movidius_ncs_lib::Tensor::ConstPtr = std::shared_ptr<Tensor const>

Definition at line 33 of file tensor.h.

using movidius_ncs_lib::Tensor::Ptr = std::shared_ptr<Tensor>

Definition at line 32 of file tensor.h.

Constructor & Destructor Documentation

movidius_ncs_lib::Tensor::Tensor ( const std::pair< int, int > &  net_dim,
const std::vector< float > &  mean,
const float &  scale 
)

Definition at line 28 of file tensor.cpp.

Member Function Documentation

void movidius_ncs_lib::Tensor::clearTensor ( )

Definition at line 80 of file tensor.cpp.

void movidius_ncs_lib::Tensor::fp16tofp32 ( float *__restrict  out,
uint16_t  in 
)
static

Definition at line 89 of file tensor.cpp.

void movidius_ncs_lib::Tensor::fp32tofp16 ( uint16_t *__restrict  out,
float  in 
)
static

Definition at line 105 of file tensor.cpp.

int movidius_ncs_lib::Tensor::getImageHeight ( )
inline

Definition at line 54 of file tensor.h.

int movidius_ncs_lib::Tensor::getImageWidth ( )
inline

Definition at line 50 of file tensor.h.

void movidius_ncs_lib::Tensor::loadImageData ( const cv::Mat &  image)

Definition at line 41 of file tensor.cpp.

const uint16_t* movidius_ncs_lib::Tensor::raw ( ) const
inline

Definition at line 42 of file tensor.h.

const size_t movidius_ncs_lib::Tensor::size ( ) const
inline

Definition at line 46 of file tensor.h.

Member Data Documentation

int movidius_ncs_lib::Tensor::image_height_
private

Definition at line 68 of file tensor.h.

int movidius_ncs_lib::Tensor::image_width_
private

Definition at line 67 of file tensor.h.

std::vector<float> movidius_ncs_lib::Tensor::mean_
private

Definition at line 69 of file tensor.h.

int movidius_ncs_lib::Tensor::net_height_
private

Definition at line 66 of file tensor.h.

int movidius_ncs_lib::Tensor::net_width_
private

Definition at line 65 of file tensor.h.

float movidius_ncs_lib::Tensor::scale_
private

Definition at line 70 of file tensor.h.

std::vector<uint16_t> movidius_ncs_lib::Tensor::tensor_
private

Definition at line 64 of file tensor.h.


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


movidius_ncs_lib
Author(s): Xiaojun Huang
autogenerated on Mon Jun 10 2019 14:11:23