"...text-generation-inference.git" did not exist on "53ee09c0b0004777f029f594ce44cffa6350ed08"
Unverified Commit fa470ebc authored by Miguel Mendez's avatar Miguel Mendez Committed by GitHub
Browse files

Force copy of input img (#297)

parent 02f2573a
......@@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True):
Returns:
ndarray: The normalized image.
"""
img = np.float32(img) if img.dtype != np.float32 else img.copy()
img = img.copy().astype(np.float32)
return imnormalize_(img, mean, std, to_rgb)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment