Error checking functions.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
input |
Array | 2 or 3 dimension array ([height, width] or [height, width, channel]) |
Throws:
Will throw an error if the input is not a 2D or 3D array.
Returns:
input - 3d input array
- Type
- Array
Methods
(inner) check2DFilter(filter) → {Array}
- Source:
Check if filter is in correct type.
Parameters:
Name | Type | Description |
---|---|---|
filter |
Array | 2 dimension array ([height, width]) |
Throws:
Will throw an error if the filter is not a 2D array.
Returns:
filter - 2d filter array
- Type
- Array
(inner) check2DPadding(padding) → {Array}
- Source:
Check if padding is in correct type.
Parameters:
Name | Type | Description |
---|---|---|
padding |
Array | 2 or 4 dimensional ([right, down] or [up, right, down, left]) |
Throws:
Will throw an error if the padding is not a 2D array.
Returns:
padding - 4d padding array
- Type
- Array
(inner) check2Dstrides(strides) → {Array}
- Source:
Check if strides is in correct type.
Parameters:
Name | Type | Description |
---|---|---|
strides |
Array | 2 dimension array ([height, width]) |
Throws:
Will throw an error if the strides is not a 2D array.
Returns:
strides - 4d strides array
- Type
- Array
(inner) check3DFilter(filter) → {Array}
- Source:
Check if filter is in correct type.
Parameters:
Name | Type | Description |
---|---|---|
filter |
Array | 3 dimension array ([height, width, out-channel]) |
Throws:
Will throw an error if the filter is not a 3D array.
Returns:
filter - 3d filter array
- Type
- Array
(inner) checkTFPadding(padding) → {Array}
- Source:
Check if tensorflow-style padding is in correct type.
Parameters:
Name | Type | Description |
---|---|---|
padding |
String | The padding algorithm. Either "VALID" or "SAME". |
Throws:
Will throw an error if the padding is not either "SAME" or "VALID".
Returns:
padding - Either "VALID" or "SAME".
- Type
- Array