mirror of
https://github.com/google/mozc-devices.git
synced 2025-11-09 01:03:26 +03:00
TensorFlow version up
This commit is contained in:
@@ -61,7 +61,7 @@ setup(
|
||||
install_requires=[
|
||||
'cairocffi',
|
||||
'pillow',
|
||||
'tensorflow~=2.5.1',
|
||||
'tensorflow~=2.9.1',
|
||||
'tf_slim~=1.1.0',
|
||||
'enum34;python_version<"3.4"',
|
||||
'pyserial',
|
||||
|
||||
@@ -113,7 +113,8 @@ def normalize_x(x):
|
||||
x = np.array(x)
|
||||
max_ = np.max(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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user