diff --git a/internal/photoprism/tensorflow_slow_test.go b/internal/photoprism/tensorflow_slow_test.go index e0247dc42..eb87a915a 100644 --- a/internal/photoprism/tensorflow_slow_test.go +++ b/internal/photoprism/tensorflow_slow_test.go @@ -4,6 +4,7 @@ package photoprism import ( "io/ioutil" + "math" "testing" "github.com/photoprism/photoprism/internal/test" @@ -30,6 +31,6 @@ func TestTensorFlow_GetImageTags(t *testing.T) { assert.Equal(t, "tabby", result[0].Label) assert.Equal(t, "tiger cat", result[1].Label) - assert.Equal(t, float32(0.1648176), result[1].Probability) + assert.Equal(t, float64(0.165), math.Round(float64(result[1].Probability)*1000)/1000) } } diff --git a/internal/photoprism/tensorflow_test.go b/internal/photoprism/tensorflow_test.go index f090a3f78..3cdd3d2f3 100644 --- a/internal/photoprism/tensorflow_test.go +++ b/internal/photoprism/tensorflow_test.go @@ -1,6 +1,7 @@ package photoprism import ( + "math" "testing" "github.com/photoprism/photoprism/internal/test" @@ -24,5 +25,5 @@ func TestTensorFlow_GetImageTagsFromFile(t *testing.T) { assert.Equal(t, "tabby", result[0].Label) assert.Equal(t, "tiger cat", result[1].Label) - assert.Equal(t, float32(0.1648176), result[1].Probability) + assert.Equal(t, float64(0.165), math.Round(float64(result[1].Probability)*1000)/1000) }