mirror of
https://github.com/google/mozc-devices.git
synced 2025-11-08 16:53:28 +03:00
TensorFlow version up
This commit is contained in:
committed by
Shuhei Iitsuka
parent
f43a0829f6
commit
38756c0a9a
@@ -61,7 +61,7 @@ setup(
|
|||||||
install_requires=[
|
install_requires=[
|
||||||
'cairocffi',
|
'cairocffi',
|
||||||
'pillow',
|
'pillow',
|
||||||
'tensorflow~=2.5.1',
|
'tensorflow~=2.9.1',
|
||||||
'tf_slim~=1.1.0',
|
'tf_slim~=1.1.0',
|
||||||
'enum34;python_version<"3.4"',
|
'enum34;python_version<"3.4"',
|
||||||
'pyserial',
|
'pyserial',
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ def normalize_x(x):
|
|||||||
x = np.array(x)
|
x = np.array(x)
|
||||||
max_ = np.max(x[:, :2], axis=0)
|
max_ = np.max(x[:, :2], axis=0)
|
||||||
min_ = np.min(x[:, :2], axis=0)
|
min_ = np.min(x[:, :2], axis=0)
|
||||||
x[:, :2] = (x[:, :2] - min_) / (max_ - min_)
|
dist = max_ - min_
|
||||||
|
x[:, :2] = (x[:, :2] - min_) / np.fmax(dist, np.ones_like(dist) * 0.0001)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user