mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Add "edge" mode to mx.pad (#1309)
* Add edge padding mode * fix pad in pooling * string arg instead of enum
This commit is contained in:
@@ -263,6 +263,7 @@ array pad(
|
||||
const std::vector<int>& low_pad_size,
|
||||
const std::vector<int>& high_pad_size,
|
||||
const array& pad_value = array(0),
|
||||
const std::string mode = "constant",
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Pad an array with a constant value along all axes */
|
||||
@@ -270,16 +271,19 @@ array pad(
|
||||
const array& a,
|
||||
const std::vector<std::pair<int, int>>& pad_width,
|
||||
const array& pad_value = array(0),
|
||||
const std::string mode = "constant",
|
||||
StreamOrDevice s = {});
|
||||
array pad(
|
||||
const array& a,
|
||||
const std::pair<int, int>& pad_width,
|
||||
const array& pad_value = array(0),
|
||||
const std::string mode = "constant",
|
||||
StreamOrDevice s = {});
|
||||
array pad(
|
||||
const array& a,
|
||||
int pad_width,
|
||||
const array& pad_value = array(0),
|
||||
const std::string mode = "constant",
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Permutes the dimensions in reverse order. */
|
||||
|
||||
Reference in New Issue
Block a user