1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-12-24 18:49:46 +01:00

Increase the number of iterations for MatrixTest. (#107)

The number of iterations was reduced from 1000 to 300 during review, but that
turned out to be too low and the test now fails about 20% of the time.
After changing it back to 1000, the test succeeded at 50 out of 50 runs.
This commit is contained in:
Judah Jacobson 2017-05-09 09:54:09 -07:00 committed by GitHub
parent a64af5076a
commit ff5f1cccf4

View file

@ -30,7 +30,7 @@ fitMatrix = testCase "fitMatrix" $ TF.runSession $ do
diff = matx `TF.sub` (u `TF.matMul` v)
loss = reduceMean $ TF.square diff
trainStep <- gradientDescent 0.01 loss [u, v]
replicateM_ 300 (TF.run trainStep)
replicateM_ 1000 (TF.run trainStep)
(u',v') <- TF.run (u, v)
-- ones = u * v
liftIO $ assertAllClose (V.fromList ones) ((*) <$> u' <*> v')