用法:
mxnet.ndarray.sparse.clip(data=None, a_min=_Null, a_max=_Null, out=None, name=None, **kwargs)
out:- 此函數的輸出。
NDArray 或 NDArray 列表
參數:
返回:
返回類型:
剪輯(限製)數組中的值。給定一個區間,區間外的值被裁剪到區間邊。在
a_min
和a_max
之間剪輯x
將是::.. 數學:clip(x, a_min, a_max) = \max(\min(x, a_max), a_min))
- 例子::
x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 剪輯(x,1,8) = [ 1., 1., 2., 3., 4., 5. , 6., 7., 8., 8.]
clip
輸出的存儲類型取決於輸入的存儲類型和 a_min、a_max 參數值:clip(default) = default
clip(row_sparse, a_min <= 0, a_max >= 0) = row_sparse
clip(csr, a_min <= 0, a_max >= 0) = csr
clip(row_sparse, a_min < 0, a_max < 0) = default
clip(row_sparse, a_min > 0, a_max > 0) = default
clip(csr, a_min < 0, a_max < 0) = csr
clip(csr, a_min > 0, a_max > 0) = csr
相關用法
- Python mxnet.ndarray.sparse.concat用法及代碼示例
- Python mxnet.ndarray.sparse.ceil用法及代碼示例
- Python mxnet.ndarray.sparse.cbrt用法及代碼示例
- Python mxnet.ndarray.sparse.csr_matrix用法及代碼示例
- Python mxnet.ndarray.sparse.cast_storage用法及代碼示例
- Python mxnet.ndarray.sparse.trunc用法及代碼示例
- Python mxnet.ndarray.sparse.row_sparse_array用法及代碼示例
- Python mxnet.ndarray.sparse.broadcast_mul用法及代碼示例
- Python mxnet.ndarray.sparse.rsqrt用法及代碼示例
- Python mxnet.ndarray.sparse.sgd_update用法及代碼示例
- Python mxnet.ndarray.sparse.broadcast_plus用法及代碼示例
- Python mxnet.ndarray.sparse.rint用法及代碼示例
- Python mxnet.ndarray.sparse.RowSparseNDArray用法及代碼示例
- Python mxnet.ndarray.sparse.sign用法及代碼示例
- Python mxnet.ndarray.sparse.make_loss用法及代碼示例
- Python mxnet.ndarray.sparse.adagrad_update用法及代碼示例
- Python mxnet.ndarray.sparse.exp用法及代碼示例
- Python mxnet.ndarray.sparse.square用法及代碼示例
- Python mxnet.ndarray.sparse.retain用法及代碼示例
- Python mxnet.ndarray.sparse.round用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.ndarray.sparse.clip。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。