tensorflow / similarity

TensorFlow Similarity is a python package focused on making similarity learning quick and easy.
Apache License 2.0
1.01k stars 104 forks source link

Fix load_model for ContrastiveModel #296

Closed tomrtk closed 2 years ago

tomrtk commented 2 years ago

Fix load_model for ContrastiveModel to work within a distributed strategy and, I also added a test for save and load of ContrastiveModel as I could not see it was tested.

The test needed to use GPU to be able to replicate #287. So I made a fixture to use GPU if available for the test, to override conftest.py who removes all GPUs.

Resolve #287