Compute Library
 20.08
WeightsInfo Class Reference

Convolution Layer Weights Information class. More...

#include <Types.h>

Public Member Functions

 WeightsInfo ()
 Default constructor. More...
 
 WeightsInfo (bool are_reshaped, unsigned int kernel_width, unsigned int kernel_height, unsigned int num_kernels, bool retain_internal_weights=false)
 Constructor. More...
 
bool are_reshaped () const
 Flag which specifies if the weights tensor has been reshaped. More...
 
unsigned int num_kernels () const
 Return the number of convolution kernels. More...
 
std::pair< unsigned int, unsigned int > kernel_size () const
 Return the width and height of the kernel. More...
 
bool retain_internal_weights () const
 

Detailed Description

Convolution Layer Weights Information class.

This class stores the necessary information to compute convolution layer when the weights are already reshaped

Definition at line 1694 of file Types.h.

Constructor & Destructor Documentation

◆ WeightsInfo() [1/2]

WeightsInfo ( )
inline

Default constructor.

Definition at line 1698 of file Types.h.

1699  : _are_reshaped(false), _kernel_width(0), _kernel_height(0), _num_kernels(0), _retain_internal_weights(false)
1700  {
1701  }

◆ WeightsInfo() [2/2]

WeightsInfo ( bool  are_reshaped,
unsigned int  kernel_width,
unsigned int  kernel_height,
unsigned int  num_kernels,
bool  retain_internal_weights = false 
)
inline

Constructor.

Parameters
[in]are_reshapedTrue if the weights have been reshaped
[in]kernel_widthKernel width.
[in]kernel_heightKernel height.
[in]num_kernelsNumber of convolution kernels.
[in]retain_internal_weights(Optional) True if internal reshaped weights must be retained. Used for reconfiguration purposes. Default is false.

Definition at line 1710 of file Types.h.

1711  : _are_reshaped(are_reshaped), _kernel_width(kernel_width), _kernel_height(kernel_height), _num_kernels(num_kernels), _retain_internal_weights(retain_internal_weights)
1712  {
1713  }
bool are_reshaped() const
Flag which specifies if the weights tensor has been reshaped.
Definition: Types.h:1718
unsigned int num_kernels() const
Return the number of convolution kernels.
Definition: Types.h:1726
bool retain_internal_weights() const
Definition: Types.h:1738

Member Function Documentation

◆ are_reshaped()

bool are_reshaped ( ) const
inline

Flag which specifies if the weights tensor has been reshaped.

Returns
True if the weights tensors has been reshaped

Definition at line 1718 of file Types.h.

1719  {
1720  return _are_reshaped;
1721  };

◆ kernel_size()

std::pair<unsigned int, unsigned int> kernel_size ( ) const
inline

Return the width and height of the kernel.

Returns
The width and height of the kernel

Definition at line 1734 of file Types.h.

1735  {
1736  return std::make_pair(_kernel_width, _kernel_height);
1737  }

◆ num_kernels()

unsigned int num_kernels ( ) const
inline

Return the number of convolution kernels.

Returns
The number of convolution kernels

Definition at line 1726 of file Types.h.

1727  {
1728  return _num_kernels;
1729  };

◆ retain_internal_weights()

bool retain_internal_weights ( ) const
inline

Definition at line 1738 of file Types.h.

1739  {
1740  return _retain_internal_weights;
1741  }

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