mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
scripts/libraries: Fix pre-processing float input array normalization.
ULAB only does simple assignment operator operations in-place.
This commit is contained in:
parent
14d277c95b
commit
eccb90699d
@ -93,4 +93,6 @@ class Normalization:
|
||||
fadd = (fadd - np.array(self.mean)) / np.array(self.stdev)
|
||||
fscale = fscale / np.array(self.stdev)
|
||||
|
||||
array = (array * fscale) + fadd
|
||||
# Apply normalization in-place (must be done in two steps for ulab).
|
||||
array *= fscale
|
||||
array += fadd
|
||||
|
Loading…
Reference in New Issue
Block a user