pythonlessons / mltu

Machine Learning Training Utilities (for TensorFlow and PyTorch)
MIT License
160 stars 100 forks source link

make Model2onnx agnostic to the type of model used by tensorflow #53

Closed seidnerj closed 1 month ago

seidnerj commented 1 month ago

Currently Model2onnx expects a file with an extension of "h5" models (HDF5 format), but really there's not reason why this would be dependant on the file extension. This makes Model2onnx agnostic to the file extension (and also the tensorflow actual model type)

pythonlessons commented 1 month ago

Thank you for this suggestion, but I think it would be better to do it in the following way:

from pathlib import Path

onnx_model_path = str(Path(self.saved_model_path).with_suffix('.onnx'))
seidnerj commented 1 month ago

Sure thing, I opened a new PR.