mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-23 11:29:43 +01:00
Sort the ops generated in TensorFlow.GenOps.Core. (#96)
This commit is contained in:
parent
55ca545915
commit
de16a576da
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,7 @@ module TensorFlow.OpGen
|
||||||
import Data.Foldable (toList)
|
import Data.Foldable (toList)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.ProtoLens (def, showMessage)
|
import Data.ProtoLens (def, showMessage)
|
||||||
|
import Data.List (sortOn)
|
||||||
import Data.List.NonEmpty (NonEmpty)
|
import Data.List.NonEmpty (NonEmpty)
|
||||||
import qualified Data.List.NonEmpty as NE
|
import qualified Data.List.NonEmpty as NE
|
||||||
import Lens.Family2 ((^.), (.~), (&), view)
|
import Lens.Family2 ((^.), (.~), (&), view)
|
||||||
|
@ -132,6 +133,7 @@ docOpList flags opList =
|
||||||
, empty
|
, empty
|
||||||
, folddoc (\x y -> x </> empty </> y)
|
, folddoc (\x y -> x </> empty </> y)
|
||||||
(map renderOpAndExtras $
|
(map renderOpAndExtras $
|
||||||
|
sortOn (view name) $
|
||||||
filter (not . flip elem exclusions . view name) $
|
filter (not . flip elem exclusions . view name) $
|
||||||
toList $ opList ^. op)
|
toList $ opList ^. op)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue