2 Commits
Author SHA1 Message Date
cyrilix 415d39c5bb fix: bad typing declaration 2023-04-19 19:56:45 +02:00
cyrilix 013a5135ae fix(tensorflow): bad version dependency on flatbuffer 2023-04-19 19:56:24 +02:00
3 changed files with 677 additions and 676 deletions
Generated
+675 -675
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -12,6 +12,7 @@ python = ">=3.10,<3.11"
tensorflow = "^2.10.0" tensorflow = "^2.10.0"
numpy = "^1.23.4" numpy = "^1.23.4"
pillow = "^8.3.2" pillow = "^8.3.2"
flatbuffers = "<2.11"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
mypy = "^0.982" mypy = "^0.982"
+1 -1
View File
@@ -187,7 +187,7 @@ def train(model_type: str, record_field: str, batch_size: int, slide_size: int,
# Save model for tensorflow using # Save model for tensorflow using
model.save(f'/opt/ml/model/model_{record_field.replace("_", "")}_{model_type}_{str(img_width)}x{str(img_height)}h{str(horizon)}') model.save(f'/opt/ml/model/model_{record_field.replace("_", "")}_{model_type}_{str(img_width)}x{str(img_height)}h{str(horizon)}')
def representative_dataset() -> typing.Generator[typing.List[tf.float32], typing.Any, None]: def representative_dataset() -> typing.Generator[typing.List[float], typing.Any, None]:
for d in tf.data.Dataset.from_tensor_slices(images).batch(1).take(100): for d in tf.data.Dataset.from_tensor_slices(images).batch(1).take(100):
yield [tf.dtypes.cast(d, tf.float32)] yield [tf.dtypes.cast(d, tf.float32)]