1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-06-02 19:13:34 +02:00

Sort the ops generated in TensorFlow.GenOps.Core.

This commit is contained in:
Judah Jacobson 2017-04-07 22:57:05 -07:00
parent 16d660c3bc
commit 910549c261

View File

@ -53,6 +53,7 @@ module TensorFlow.OpGen
import Data.Foldable (toList)
import Data.Maybe (fromMaybe)
import Data.ProtoLens (def, showMessage)
import Data.List (sortOn)
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NE
import Lens.Family2 ((^.), (.~), (&), view)
@ -132,6 +133,7 @@ docOpList flags opList =
, empty
, folddoc (\x y -> x </> empty </> y)
(map renderOpAndExtras $
sortOn (view name) $
filter (not . flip elem exclusions . view name) $
toList $ opList ^. op)
]