qbcompiler.calibration.preprocess.NpyPad Class Reference#
|
Mobilint SDK qb Compiler v1.2
MCS002-EN
|
qbcompiler.calibration.preprocess.NpyPad Class Reference
Pad NumPy arrays to a desired shape. More...
Public Member Functions | |
| __init__ (self, List[int] shape, str padding_type, Optional[float] pad_val=0) | |
| __call__ (self, np.ndarray data) | |
| slice_padded_data (self, data) | |
Public Attributes | |
| shape = np.array(shape) | |
| str | padding_type = padding_type |
| pad_val = pad_val | |
Detailed Description
Pad NumPy arrays to a desired shape.
- Parameters
-
shape list[int]. Expected output shape after padding. padding_type string. Padding mode, either "constant" or "reflect". pad_val float. Fill value when padding_mode is 'constant'. Defaults to 0.
Definition at line 90 of file preprocess.py.
Constructor & Destructor Documentation
◆ __init__()
| qbcompiler.calibration.preprocess.NpyPad.__init__ | ( | self, | |
| List[int] | shape, | ||
| str | padding_type, | ||
| Optional[float] | pad_val = 0 ) |
Definition at line 99 of file preprocess.py.
Member Function Documentation
◆ __call__()
| qbcompiler.calibration.preprocess.NpyPad.__call__ | ( | self, | |
| np.ndarray | data ) |
Definition at line 110 of file preprocess.py.
◆ slice_padded_data()
| qbcompiler.calibration.preprocess.NpyPad.slice_padded_data | ( | self, | |
| data ) |
Definition at line 135 of file preprocess.py.
Member Data Documentation
◆ shape
| qbcompiler.calibration.preprocess.NpyPad.shape = np.array(shape) |
Definition at line 106 of file preprocess.py.
◆ padding_type
| str qbcompiler.calibration.preprocess.NpyPad.padding_type = padding_type |
Definition at line 107 of file preprocess.py.
◆ pad_val
| qbcompiler.calibration.preprocess.NpyPad.pad_val = pad_val |
Definition at line 108 of file preprocess.py.
The documentation for this class was generated from the following file:
Generated by