MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / rescale

Function rescale

clip/image_processor.py:88–89  ·  view source on GitHub ↗
(image: mx.array)

Source from the content-addressed store, hash-verified

86
87
88def rescale(image: mx.array) -> mx.array:
89 return image.astype(mx.float32) * (1 / 255.0)
90
91
92def normalize(image: mx.array, mean: mx.array, std: mx.array) -> mx.array:

Callers 1

_preprocessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected