Compute Library
 21.02
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 1765 of file Types.h.

Constructor & Destructor Documentation

◆ WeightsInfo() [1/2]

WeightsInfo ( )
inline

Default constructor.

Definition at line 1769 of file Types.h.

1770  : _are_reshaped(false), _kernel_width(0), _kernel_height(0), _num_kernels(0), _retain_internal_weights(false)
1771  {
1772  }

◆ 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 1781 of file Types.h.

1782  : _are_reshaped(are_reshaped), _kernel_width(kernel_width), _kernel_height(kernel_height), _num_kernels(num_kernels), _retain_internal_weights(retain_internal_weights)
1783  {
1784  }
bool are_reshaped() const
Flag which specifies if the weights tensor has been reshaped.
Definition: Types.h:1789
unsigned int num_kernels() const
Return the number of convolution kernels.
Definition: Types.h:1797
bool retain_internal_weights() const
Definition: Types.h:1809

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 1789 of file Types.h.

Referenced by GCConvolutionLayer::configure(), arm_compute::operator<<(), NEGEMMConvolutionLayer::validate(), and CLGEMMConvolutionLayer::validate().

1790  {
1791  return _are_reshaped;
1792  };

◆ 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 1805 of file Types.h.

Referenced by arm_compute::operator<<().

1806  {
1807  return std::make_pair(_kernel_width, _kernel_height);
1808  }

◆ num_kernels()

unsigned int num_kernels ( ) const
inline

Return the number of convolution kernels.

Returns
The number of convolution kernels

Definition at line 1797 of file Types.h.

Referenced by arm_compute::operator<<().

1798  {
1799  return _num_kernels;
1800  };

◆ retain_internal_weights()

bool retain_internal_weights ( ) const
inline

Definition at line 1809 of file Types.h.

Referenced by CLDirectDeconvolutionLayer::configure().

1810  {
1811  return _retain_internal_weights;
1812  }

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