TensorFlow version up

This commit is contained in:
Shuhei Iitsuka
2022-06-06 16:05:05 +09:00
parent f43a0829f6
commit 0b1a2eb3d3
2 changed files with 3 additions and 2 deletions

View File

@@ -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',

View File

@@ -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