{- This file was auto-generated from tensorflow/core/protobuf/saver.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Tensorflow.Core.Protobuf.Saver (
        SaverDef(), SaverDef'CheckpointFormatVersion(..),
        SaverDef'CheckpointFormatVersion(),
        SaverDef'CheckpointFormatVersion'UnrecognizedValue
    ) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.filenameTensorName' @:: Lens' SaverDef Data.Text.Text@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.saveTensorName' @:: Lens' SaverDef Data.Text.Text@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.restoreOpName' @:: Lens' SaverDef Data.Text.Text@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.maxToKeep' @:: Lens' SaverDef Data.Int.Int32@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.sharded' @:: Lens' SaverDef Prelude.Bool@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.keepCheckpointEveryNHours' @:: Lens' SaverDef Prelude.Float@
         * 'Proto.Tensorflow.Core.Protobuf.Saver_Fields.version' @:: Lens' SaverDef SaverDef'CheckpointFormatVersion@ -}
data SaverDef
  = SaverDef'_constructor {SaverDef -> Text
_SaverDef'filenameTensorName :: !Data.Text.Text,
                           SaverDef -> Text
_SaverDef'saveTensorName :: !Data.Text.Text,
                           SaverDef -> Text
_SaverDef'restoreOpName :: !Data.Text.Text,
                           SaverDef -> Int32
_SaverDef'maxToKeep :: !Data.Int.Int32,
                           SaverDef -> Bool
_SaverDef'sharded :: !Prelude.Bool,
                           SaverDef -> Float
_SaverDef'keepCheckpointEveryNHours :: !Prelude.Float,
                           SaverDef -> SaverDef'CheckpointFormatVersion
_SaverDef'version :: !SaverDef'CheckpointFormatVersion,
                           SaverDef -> FieldSet
_SaverDef'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (SaverDef -> SaverDef -> Bool
(SaverDef -> SaverDef -> Bool)
-> (SaverDef -> SaverDef -> Bool) -> Eq SaverDef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SaverDef -> SaverDef -> Bool
$c/= :: SaverDef -> SaverDef -> Bool
== :: SaverDef -> SaverDef -> Bool
$c== :: SaverDef -> SaverDef -> Bool
Prelude.Eq, Eq SaverDef
Eq SaverDef =>
(SaverDef -> SaverDef -> Ordering)
-> (SaverDef -> SaverDef -> Bool)
-> (SaverDef -> SaverDef -> Bool)
-> (SaverDef -> SaverDef -> Bool)
-> (SaverDef -> SaverDef -> Bool)
-> (SaverDef -> SaverDef -> SaverDef)
-> (SaverDef -> SaverDef -> SaverDef)
-> Ord SaverDef
SaverDef -> SaverDef -> Bool
SaverDef -> SaverDef -> Ordering
SaverDef -> SaverDef -> SaverDef
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SaverDef -> SaverDef -> SaverDef
$cmin :: SaverDef -> SaverDef -> SaverDef
max :: SaverDef -> SaverDef -> SaverDef
$cmax :: SaverDef -> SaverDef -> SaverDef
>= :: SaverDef -> SaverDef -> Bool
$c>= :: SaverDef -> SaverDef -> Bool
> :: SaverDef -> SaverDef -> Bool
$c> :: SaverDef -> SaverDef -> Bool
<= :: SaverDef -> SaverDef -> Bool
$c<= :: SaverDef -> SaverDef -> Bool
< :: SaverDef -> SaverDef -> Bool
$c< :: SaverDef -> SaverDef -> Bool
compare :: SaverDef -> SaverDef -> Ordering
$ccompare :: SaverDef -> SaverDef -> Ordering
$cp1Ord :: Eq SaverDef
Prelude.Ord)
instance Prelude.Show SaverDef where
  showsPrec :: Int -> SaverDef -> ShowS
showsPrec _ __x :: SaverDef
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (SaverDef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SaverDef
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SaverDef "filenameTensorName" Data.Text.Text where
  fieldOf :: Proxy# "filenameTensorName"
-> (Text -> f Text) -> SaverDef -> f SaverDef
fieldOf _
    = ((Text -> f Text) -> SaverDef -> f SaverDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Text)
-> (SaverDef -> Text -> SaverDef)
-> Lens SaverDef SaverDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Text
_SaverDef'filenameTensorName
           (\ x__ :: SaverDef
x__ y__ :: Text
y__ -> SaverDef
x__ {_SaverDef'filenameTensorName :: Text
_SaverDef'filenameTensorName = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "saveTensorName" Data.Text.Text where
  fieldOf :: Proxy# "saveTensorName"
-> (Text -> f Text) -> SaverDef -> f SaverDef
fieldOf _
    = ((Text -> f Text) -> SaverDef -> f SaverDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Text)
-> (SaverDef -> Text -> SaverDef)
-> Lens SaverDef SaverDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Text
_SaverDef'saveTensorName
           (\ x__ :: SaverDef
x__ y__ :: Text
y__ -> SaverDef
x__ {_SaverDef'saveTensorName :: Text
_SaverDef'saveTensorName = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "restoreOpName" Data.Text.Text where
  fieldOf :: Proxy# "restoreOpName"
-> (Text -> f Text) -> SaverDef -> f SaverDef
fieldOf _
    = ((Text -> f Text) -> SaverDef -> f SaverDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Text)
-> (SaverDef -> Text -> SaverDef)
-> Lens SaverDef SaverDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Text
_SaverDef'restoreOpName
           (\ x__ :: SaverDef
x__ y__ :: Text
y__ -> SaverDef
x__ {_SaverDef'restoreOpName :: Text
_SaverDef'restoreOpName = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "maxToKeep" Data.Int.Int32 where
  fieldOf :: Proxy# "maxToKeep" -> (Int32 -> f Int32) -> SaverDef -> f SaverDef
fieldOf _
    = ((Int32 -> f Int32) -> SaverDef -> f SaverDef)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Int32)
-> (SaverDef -> Int32 -> SaverDef)
-> Lens SaverDef SaverDef Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Int32
_SaverDef'maxToKeep (\ x__ :: SaverDef
x__ y__ :: Int32
y__ -> SaverDef
x__ {_SaverDef'maxToKeep :: Int32
_SaverDef'maxToKeep = Int32
y__}))
        (Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "sharded" Prelude.Bool where
  fieldOf :: Proxy# "sharded" -> (Bool -> f Bool) -> SaverDef -> f SaverDef
fieldOf _
    = ((Bool -> f Bool) -> SaverDef -> f SaverDef)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Bool)
-> (SaverDef -> Bool -> SaverDef)
-> Lens SaverDef SaverDef Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Bool
_SaverDef'sharded (\ x__ :: SaverDef
x__ y__ :: Bool
y__ -> SaverDef
x__ {_SaverDef'sharded :: Bool
_SaverDef'sharded = Bool
y__}))
        (Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "keepCheckpointEveryNHours" Prelude.Float where
  fieldOf :: Proxy# "keepCheckpointEveryNHours"
-> (Float -> f Float) -> SaverDef -> f SaverDef
fieldOf _
    = ((Float -> f Float) -> SaverDef -> f SaverDef)
-> ((Float -> f Float) -> Float -> f Float)
-> (Float -> f Float)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> Float)
-> (SaverDef -> Float -> SaverDef)
-> Lens SaverDef SaverDef Float Float
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> Float
_SaverDef'keepCheckpointEveryNHours
           (\ x__ :: SaverDef
x__ y__ :: Float
y__ -> SaverDef
x__ {_SaverDef'keepCheckpointEveryNHours :: Float
_SaverDef'keepCheckpointEveryNHours = Float
y__}))
        (Float -> f Float) -> Float -> f Float
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaverDef "version" SaverDef'CheckpointFormatVersion where
  fieldOf :: Proxy# "version"
-> (SaverDef'CheckpointFormatVersion
    -> f SaverDef'CheckpointFormatVersion)
-> SaverDef
-> f SaverDef
fieldOf _
    = ((SaverDef'CheckpointFormatVersion
  -> f SaverDef'CheckpointFormatVersion)
 -> SaverDef -> f SaverDef)
-> ((SaverDef'CheckpointFormatVersion
     -> f SaverDef'CheckpointFormatVersion)
    -> SaverDef'CheckpointFormatVersion
    -> f SaverDef'CheckpointFormatVersion)
-> (SaverDef'CheckpointFormatVersion
    -> f SaverDef'CheckpointFormatVersion)
-> SaverDef
-> f SaverDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaverDef -> SaverDef'CheckpointFormatVersion)
-> (SaverDef -> SaverDef'CheckpointFormatVersion -> SaverDef)
-> Lens
     SaverDef
     SaverDef
     SaverDef'CheckpointFormatVersion
     SaverDef'CheckpointFormatVersion
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaverDef -> SaverDef'CheckpointFormatVersion
_SaverDef'version (\ x__ :: SaverDef
x__ y__ :: SaverDef'CheckpointFormatVersion
y__ -> SaverDef
x__ {_SaverDef'version :: SaverDef'CheckpointFormatVersion
_SaverDef'version = SaverDef'CheckpointFormatVersion
y__}))
        (SaverDef'CheckpointFormatVersion
 -> f SaverDef'CheckpointFormatVersion)
-> SaverDef'CheckpointFormatVersion
-> f SaverDef'CheckpointFormatVersion
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SaverDef where
  messageName :: Proxy SaverDef -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SaverDef"
  packedMessageDescriptor :: Proxy SaverDef -> ByteString
packedMessageDescriptor _
    = "\n\
      \\bSaverDef\DC20\n\
      \\DC4filename_tensor_name\CAN\SOH \SOH(\tR\DC2filenameTensorName\DC2(\n\
      \\DLEsave_tensor_name\CAN\STX \SOH(\tR\SOsaveTensorName\DC2&\n\
      \\SIrestore_op_name\CAN\ETX \SOH(\tR\rrestoreOpName\DC2\RS\n\
      \\vmax_to_keep\CAN\EOT \SOH(\ENQR\tmaxToKeep\DC2\CAN\n\
      \\asharded\CAN\ENQ \SOH(\bR\asharded\DC2@\n\
      \\GSkeep_checkpoint_every_n_hours\CAN\ACK \SOH(\STXR\EMkeepCheckpointEveryNHours\DC2F\n\
      \\aversion\CAN\a \SOH(\SO2,.tensorflow.SaverDef.CheckpointFormatVersionR\aversion\"5\n\
      \\ETBCheckpointFormatVersion\DC2\n\
      \\n\
      \\ACKLEGACY\DLE\NUL\DC2\ACK\n\
      \\STXV1\DLE\SOH\DC2\ACK\n\
      \\STXV2\DLE\STX"
  packedFileDescriptor :: Proxy SaverDef -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor SaverDef)
fieldsByTag
    = let
        filenameTensorName__field_descriptor :: FieldDescriptor SaverDef
filenameTensorName__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor SaverDef Text
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "filename_tensor_name"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens SaverDef SaverDef Text Text -> FieldAccessor SaverDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "filenameTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"filenameTensorName")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        saveTensorName__field_descriptor :: FieldDescriptor SaverDef
saveTensorName__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor SaverDef Text
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "save_tensor_name"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens SaverDef SaverDef Text Text -> FieldAccessor SaverDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "saveTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"saveTensorName")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        restoreOpName__field_descriptor :: FieldDescriptor SaverDef
restoreOpName__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor SaverDef Text
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "restore_op_name"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens SaverDef SaverDef Text Text -> FieldAccessor SaverDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "restoreOpName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"restoreOpName")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        maxToKeep__field_descriptor :: FieldDescriptor SaverDef
maxToKeep__field_descriptor
          = String
-> FieldTypeDescriptor Int32
-> FieldAccessor SaverDef Int32
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "max_to_keep"
              (ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
              (WireDefault Int32
-> Lens SaverDef SaverDef Int32 Int32
-> FieldAccessor SaverDef Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "maxToKeep" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maxToKeep")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        sharded__field_descriptor :: FieldDescriptor SaverDef
sharded__field_descriptor
          = String
-> FieldTypeDescriptor Bool
-> FieldAccessor SaverDef Bool
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "sharded"
              (ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (WireDefault Bool
-> Lens SaverDef SaverDef Bool Bool -> FieldAccessor SaverDef Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "sharded" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"sharded")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        keepCheckpointEveryNHours__field_descriptor :: FieldDescriptor SaverDef
keepCheckpointEveryNHours__field_descriptor
          = String
-> FieldTypeDescriptor Float
-> FieldAccessor SaverDef Float
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "keep_checkpoint_every_n_hours"
              (ScalarField Float -> FieldTypeDescriptor Float
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Float
Data.ProtoLens.FloatField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
              (WireDefault Float
-> Lens SaverDef SaverDef Float Float
-> FieldAccessor SaverDef Float
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Float
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "keepCheckpointEveryNHours" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"keepCheckpointEveryNHours")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
        version__field_descriptor :: FieldDescriptor SaverDef
version__field_descriptor
          = String
-> FieldTypeDescriptor SaverDef'CheckpointFormatVersion
-> FieldAccessor SaverDef SaverDef'CheckpointFormatVersion
-> FieldDescriptor SaverDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (ScalarField SaverDef'CheckpointFormatVersion
-> FieldTypeDescriptor SaverDef'CheckpointFormatVersion
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField SaverDef'CheckpointFormatVersion
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor SaverDef'CheckpointFormatVersion)
              (WireDefault SaverDef'CheckpointFormatVersion
-> Lens
     SaverDef
     SaverDef
     SaverDef'CheckpointFormatVersion
     SaverDef'CheckpointFormatVersion
-> FieldAccessor SaverDef SaverDef'CheckpointFormatVersion
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault SaverDef'CheckpointFormatVersion
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor SaverDef
      in
        [(Tag, FieldDescriptor SaverDef)]
-> Map Tag (FieldDescriptor SaverDef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SaverDef
filenameTensorName__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SaverDef
saveTensorName__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor SaverDef
restoreOpName__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor SaverDef
maxToKeep__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor SaverDef
sharded__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 6, 
            FieldDescriptor SaverDef
keepCheckpointEveryNHours__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor SaverDef
version__field_descriptor)]
  unknownFields :: LensLike' f SaverDef FieldSet
unknownFields
    = (SaverDef -> FieldSet)
-> (SaverDef -> FieldSet -> SaverDef) -> Lens' SaverDef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        SaverDef -> FieldSet
_SaverDef'_unknownFields
        (\ x__ :: SaverDef
x__ y__ :: FieldSet
y__ -> SaverDef
x__ {_SaverDef'_unknownFields :: FieldSet
_SaverDef'_unknownFields = FieldSet
y__})
  defMessage :: SaverDef
defMessage
    = $WSaverDef'_constructor :: Text
-> Text
-> Text
-> Int32
-> Bool
-> Float
-> SaverDef'CheckpointFormatVersion
-> FieldSet
-> SaverDef
SaverDef'_constructor
        {_SaverDef'filenameTensorName :: Text
_SaverDef'filenameTensorName = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'saveTensorName :: Text
_SaverDef'saveTensorName = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'restoreOpName :: Text
_SaverDef'restoreOpName = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'maxToKeep :: Int32
_SaverDef'maxToKeep = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'sharded :: Bool
_SaverDef'sharded = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'keepCheckpointEveryNHours :: Float
_SaverDef'keepCheckpointEveryNHours = Float
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'version :: SaverDef'CheckpointFormatVersion
_SaverDef'version = SaverDef'CheckpointFormatVersion
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaverDef'_unknownFields :: FieldSet
_SaverDef'_unknownFields = []}
  parseMessage :: Parser SaverDef
parseMessage
    = let
        loop :: SaverDef -> Data.ProtoLens.Encoding.Bytes.Parser SaverDef
        loop :: SaverDef -> Parser SaverDef
loop x :: SaverDef
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      SaverDef -> Parser SaverDef
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter SaverDef SaverDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter SaverDef SaverDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SaverDef
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "filename_tensor_name"
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef Text Text -> Text -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "filenameTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"filenameTensorName") Text
y SaverDef
x)
                        18
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "save_tensor_name"
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef Text Text -> Text -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "saveTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"saveTensorName") Text
y SaverDef
x)
                        26
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "restore_op_name"
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef Text Text -> Text -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "restoreOpName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"restoreOpName") Text
y SaverDef
x)
                        32
                          -> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                          Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "max_to_keep"
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef Int32 Int32
-> Int32 -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "maxToKeep" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maxToKeep") Int32
y SaverDef
x)
                        40
                          -> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          (Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "sharded"
                                SaverDef -> Parser SaverDef
loop (Setter SaverDef SaverDef Bool Bool -> Bool -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "sharded" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"sharded") Bool
y SaverDef
x)
                        53
                          -> do Float
y <- Parser Float -> String -> Parser Float
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word32 -> Float) -> Parser Word32 -> Parser Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Word32 -> Float
Data.ProtoLens.Encoding.Bytes.wordToFloat
                                          Parser Word32
Data.ProtoLens.Encoding.Bytes.getFixed32)
                                       "keep_checkpoint_every_n_hours"
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef Float Float
-> Float -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "keepCheckpointEveryNHours" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"keepCheckpointEveryNHours") Float
y SaverDef
x)
                        56
                          -> do SaverDef'CheckpointFormatVersion
y <- Parser SaverDef'CheckpointFormatVersion
-> String -> Parser SaverDef'CheckpointFormatVersion
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Int -> SaverDef'CheckpointFormatVersion)
-> Parser Int -> Parser SaverDef'CheckpointFormatVersion
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Int -> SaverDef'CheckpointFormatVersion
forall a. Enum a => Int -> a
Prelude.toEnum
                                          ((Word64 -> Int) -> Parser Word64 -> Parser Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                             Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                             Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "version"
                                SaverDef -> Parser SaverDef
loop (Setter
  SaverDef
  SaverDef
  SaverDef'CheckpointFormatVersion
  SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") SaverDef'CheckpointFormatVersion
y SaverDef
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                SaverDef -> Parser SaverDef
loop
                                  (Setter SaverDef SaverDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SaverDef -> SaverDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter SaverDef SaverDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SaverDef
x)
      in
        Parser SaverDef -> String -> Parser SaverDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do SaverDef -> Parser SaverDef
loop SaverDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SaverDef"
  buildMessage :: SaverDef -> Builder
buildMessage
    = \ _x :: SaverDef
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Text
_v
                  = FoldLike Text SaverDef SaverDef Text Text -> SaverDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                      (forall s a (f :: * -> *).
(HasField s "filenameTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"filenameTensorName") SaverDef
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         (\ bs :: ByteString
bs
                            -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                 (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                 (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8
                         Text
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Text
_v
                     = FoldLike Text SaverDef SaverDef Text Text -> SaverDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                         (forall s a (f :: * -> *).
(HasField s "saveTensorName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"saveTensorName") SaverDef
_x
                 in
                   if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                            (\ bs :: ByteString
bs
                               -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                    (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                    (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            Text -> ByteString
Data.Text.Encoding.encodeUtf8
                            Text
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let
                      _v :: Text
_v
                        = FoldLike Text SaverDef SaverDef Text Text -> SaverDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                            (forall s a (f :: * -> *).
(HasField s "restoreOpName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"restoreOpName") SaverDef
_x
                    in
                      if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                          Builder
forall a. Monoid a => a
Data.Monoid.mempty
                      else
                          Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                               (\ bs :: ByteString
bs
                                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                       (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                               Text -> ByteString
Data.Text.Encoding.encodeUtf8
                               Text
_v))
                   (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (let
                         _v :: Int32
_v = FoldLike Int32 SaverDef SaverDef Int32 Int32 -> SaverDef -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maxToKeep" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maxToKeep") SaverDef
_x
                       in
                         if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                             Builder
forall a. Monoid a => a
Data.Monoid.mempty
                         else
                             Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Word64 -> Builder) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                  Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
                      (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (let
                            _v :: Bool
_v = FoldLike Bool SaverDef SaverDef Bool Bool -> SaverDef -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "sharded" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"sharded") SaverDef
_x
                          in
                            if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                                Builder
forall a. Monoid a => a
Data.Monoid.mempty
                            else
                                Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                                  ((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                     Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (\ b :: Bool
b -> if Bool
b then 1 else 0)
                                     Bool
_v))
                         (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            (let
                               _v :: Float
_v
                                 = FoldLike Float SaverDef SaverDef Float Float -> SaverDef -> Float
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                                     (forall s a (f :: * -> *).
(HasField s "keepCheckpointEveryNHours" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"keepCheckpointEveryNHours") SaverDef
_x
                             in
                               if Float -> Float -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Float
_v Float
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                                   Builder
forall a. Monoid a => a
Data.Monoid.mempty
                               else
                                   Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                     (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 53)
                                     ((Word32 -> Builder) -> (Float -> Word32) -> Float -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                        Word32 -> Builder
Data.ProtoLens.Encoding.Bytes.putFixed32
                                        Float -> Word32
Data.ProtoLens.Encoding.Bytes.floatToWord
                                        Float
_v))
                            (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (let
                                  _v :: SaverDef'CheckpointFormatVersion
_v = FoldLike
  SaverDef'CheckpointFormatVersion
  SaverDef
  SaverDef
  SaverDef'CheckpointFormatVersion
  SaverDef'CheckpointFormatVersion
-> SaverDef -> SaverDef'CheckpointFormatVersion
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") SaverDef
_x
                                in
                                  if SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) SaverDef'CheckpointFormatVersion
_v SaverDef'CheckpointFormatVersion
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                                      Builder
forall a. Monoid a => a
Data.Monoid.mempty
                                  else
                                      Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                        ((Int -> Builder)
-> (SaverDef'CheckpointFormatVersion -> Int)
-> SaverDef'CheckpointFormatVersion
-> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                           ((Word64 -> Builder) -> (Int -> Word64) -> Int -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                              Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                              Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
                                           SaverDef'CheckpointFormatVersion -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum
                                           SaverDef'CheckpointFormatVersion
_v))
                               (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                                  (FoldLike FieldSet SaverDef SaverDef FieldSet FieldSet
-> SaverDef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SaverDef SaverDef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SaverDef
_x))))))))
instance Control.DeepSeq.NFData SaverDef where
  rnf :: SaverDef -> ()
rnf
    = \ x__ :: SaverDef
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (SaverDef -> FieldSet
_SaverDef'_unknownFields SaverDef
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (SaverDef -> Text
_SaverDef'filenameTensorName SaverDef
x__)
                (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (SaverDef -> Text
_SaverDef'saveTensorName SaverDef
x__)
                   (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (SaverDef -> Text
_SaverDef'restoreOpName SaverDef
x__)
                      (Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                         (SaverDef -> Int32
_SaverDef'maxToKeep SaverDef
x__)
                         (Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                            (SaverDef -> Bool
_SaverDef'sharded SaverDef
x__)
                            (Float -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                               (SaverDef -> Float
_SaverDef'keepCheckpointEveryNHours SaverDef
x__)
                               (SaverDef'CheckpointFormatVersion -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SaverDef -> SaverDef'CheckpointFormatVersion
_SaverDef'version SaverDef
x__) ())))))))
newtype SaverDef'CheckpointFormatVersion'UnrecognizedValue
  = SaverDef'CheckpointFormatVersion'UnrecognizedValue Data.Int.Int32
  deriving stock (SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
(SaverDef'CheckpointFormatVersion'UnrecognizedValue
 -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> Eq SaverDef'CheckpointFormatVersion'UnrecognizedValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c/= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
== :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c== :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
Prelude.Eq, Eq SaverDef'CheckpointFormatVersion'UnrecognizedValue
Eq SaverDef'CheckpointFormatVersion'UnrecognizedValue =>
(SaverDef'CheckpointFormatVersion'UnrecognizedValue
 -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Ordering)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue
    -> SaverDef'CheckpointFormatVersion'UnrecognizedValue)
-> Ord SaverDef'CheckpointFormatVersion'UnrecognizedValue
SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Ordering
SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
$cmin :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
max :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
$cmax :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue
>= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c>= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
> :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c> :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
<= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c<= :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
< :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
$c< :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Bool
compare :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Ordering
$ccompare :: SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> Ordering
$cp1Ord :: Eq SaverDef'CheckpointFormatVersion'UnrecognizedValue
Prelude.Ord, Int -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> ShowS
[SaverDef'CheckpointFormatVersion'UnrecognizedValue] -> ShowS
SaverDef'CheckpointFormatVersion'UnrecognizedValue -> String
(Int
 -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> ShowS)
-> (SaverDef'CheckpointFormatVersion'UnrecognizedValue -> String)
-> ([SaverDef'CheckpointFormatVersion'UnrecognizedValue] -> ShowS)
-> Show SaverDef'CheckpointFormatVersion'UnrecognizedValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SaverDef'CheckpointFormatVersion'UnrecognizedValue] -> ShowS
$cshowList :: [SaverDef'CheckpointFormatVersion'UnrecognizedValue] -> ShowS
show :: SaverDef'CheckpointFormatVersion'UnrecognizedValue -> String
$cshow :: SaverDef'CheckpointFormatVersion'UnrecognizedValue -> String
showsPrec :: Int -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> ShowS
$cshowsPrec :: Int -> SaverDef'CheckpointFormatVersion'UnrecognizedValue -> ShowS
Prelude.Show)
data SaverDef'CheckpointFormatVersion
  = SaverDef'LEGACY |
    SaverDef'V1 |
    SaverDef'V2 |
    SaverDef'CheckpointFormatVersion'Unrecognized !SaverDef'CheckpointFormatVersion'UnrecognizedValue
  deriving stock (Int -> SaverDef'CheckpointFormatVersion -> ShowS
[SaverDef'CheckpointFormatVersion] -> ShowS
SaverDef'CheckpointFormatVersion -> String
(Int -> SaverDef'CheckpointFormatVersion -> ShowS)
-> (SaverDef'CheckpointFormatVersion -> String)
-> ([SaverDef'CheckpointFormatVersion] -> ShowS)
-> Show SaverDef'CheckpointFormatVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SaverDef'CheckpointFormatVersion] -> ShowS
$cshowList :: [SaverDef'CheckpointFormatVersion] -> ShowS
show :: SaverDef'CheckpointFormatVersion -> String
$cshow :: SaverDef'CheckpointFormatVersion -> String
showsPrec :: Int -> SaverDef'CheckpointFormatVersion -> ShowS
$cshowsPrec :: Int -> SaverDef'CheckpointFormatVersion -> ShowS
Prelude.Show, SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
(SaverDef'CheckpointFormatVersion
 -> SaverDef'CheckpointFormatVersion -> Bool)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion -> Bool)
-> Eq SaverDef'CheckpointFormatVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c/= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
== :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c== :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
Prelude.Eq, Eq SaverDef'CheckpointFormatVersion
Eq SaverDef'CheckpointFormatVersion =>
(SaverDef'CheckpointFormatVersion
 -> SaverDef'CheckpointFormatVersion -> Ordering)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion -> Bool)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion -> Bool)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion -> Bool)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion -> Bool)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion)
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion)
-> Ord SaverDef'CheckpointFormatVersion
SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Ordering
SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
$cmin :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
max :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
$cmax :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
>= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c>= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
> :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c> :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
<= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c<= :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
< :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
$c< :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Bool
compare :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Ordering
$ccompare :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion -> Ordering
$cp1Ord :: Eq SaverDef'CheckpointFormatVersion
Prelude.Ord)
instance Data.ProtoLens.MessageEnum SaverDef'CheckpointFormatVersion where
  maybeToEnum :: Int -> Maybe SaverDef'CheckpointFormatVersion
maybeToEnum 0 = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'LEGACY
  maybeToEnum 1 = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'V1
  maybeToEnum 2 = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'V2
  maybeToEnum k :: Int
k
    = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just
        (SaverDef'CheckpointFormatVersion'UnrecognizedValue
-> SaverDef'CheckpointFormatVersion
SaverDef'CheckpointFormatVersion'Unrecognized
           (Int32 -> SaverDef'CheckpointFormatVersion'UnrecognizedValue
SaverDef'CheckpointFormatVersion'UnrecognizedValue
              (Int -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int
k)))
  showEnum :: SaverDef'CheckpointFormatVersion -> String
showEnum SaverDef'LEGACY = "LEGACY"
  showEnum SaverDef'V1 = "V1"
  showEnum SaverDef'V2 = "V2"
  showEnum
    (SaverDef'CheckpointFormatVersion'Unrecognized (SaverDef'CheckpointFormatVersion'UnrecognizedValue k :: Int32
k))
    = Int32 -> String
forall a. Show a => a -> String
Prelude.show Int32
k
  readEnum :: String -> Maybe SaverDef'CheckpointFormatVersion
readEnum k :: String
k
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "LEGACY" = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'LEGACY
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "V1" = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'V1
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "V2" = SaverDef'CheckpointFormatVersion
-> Maybe SaverDef'CheckpointFormatVersion
forall a. a -> Maybe a
Prelude.Just SaverDef'CheckpointFormatVersion
SaverDef'V2
    | Bool
Prelude.otherwise
    = Maybe Int
-> (Int -> Maybe SaverDef'CheckpointFormatVersion)
-> Maybe SaverDef'CheckpointFormatVersion
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(Prelude.>>=) (String -> Maybe Int
forall a. Read a => String -> Maybe a
Text.Read.readMaybe String
k) Int -> Maybe SaverDef'CheckpointFormatVersion
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum
instance Prelude.Bounded SaverDef'CheckpointFormatVersion where
  minBound :: SaverDef'CheckpointFormatVersion
minBound = SaverDef'CheckpointFormatVersion
SaverDef'LEGACY
  maxBound :: SaverDef'CheckpointFormatVersion
maxBound = SaverDef'CheckpointFormatVersion
SaverDef'V2
instance Prelude.Enum SaverDef'CheckpointFormatVersion where
  toEnum :: Int -> SaverDef'CheckpointFormatVersion
toEnum k__ :: Int
k__
    = SaverDef'CheckpointFormatVersion
-> (SaverDef'CheckpointFormatVersion
    -> SaverDef'CheckpointFormatVersion)
-> Maybe SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
forall b a. b -> (a -> b) -> Maybe a -> b
Prelude.maybe
        (String -> SaverDef'CheckpointFormatVersion
forall a. HasCallStack => String -> a
Prelude.error
           (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
              "toEnum: unknown value for enum CheckpointFormatVersion: "
              (Int -> String
forall a. Show a => a -> String
Prelude.show Int
k__)))
        SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
forall a. a -> a
Prelude.id
        (Int -> Maybe SaverDef'CheckpointFormatVersion
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum Int
k__)
  fromEnum :: SaverDef'CheckpointFormatVersion -> Int
fromEnum SaverDef'LEGACY = 0
  fromEnum SaverDef'V1 = 1
  fromEnum SaverDef'V2 = 2
  fromEnum
    (SaverDef'CheckpointFormatVersion'Unrecognized (SaverDef'CheckpointFormatVersion'UnrecognizedValue k :: Int32
k))
    = Int32 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
k
  succ :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
succ SaverDef'V2
    = String -> SaverDef'CheckpointFormatVersion
forall a. HasCallStack => String -> a
Prelude.error
        "SaverDef'CheckpointFormatVersion.succ: bad argument SaverDef'V2. This value would be out of bounds."
  succ SaverDef'LEGACY = SaverDef'CheckpointFormatVersion
SaverDef'V1
  succ SaverDef'V1 = SaverDef'CheckpointFormatVersion
SaverDef'V2
  succ (SaverDef'CheckpointFormatVersion'Unrecognized _)
    = String -> SaverDef'CheckpointFormatVersion
forall a. HasCallStack => String -> a
Prelude.error
        "SaverDef'CheckpointFormatVersion.succ: bad argument: unrecognized value"
  pred :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
pred SaverDef'LEGACY
    = String -> SaverDef'CheckpointFormatVersion
forall a. HasCallStack => String -> a
Prelude.error
        "SaverDef'CheckpointFormatVersion.pred: bad argument SaverDef'LEGACY. This value would be out of bounds."
  pred SaverDef'V1 = SaverDef'CheckpointFormatVersion
SaverDef'LEGACY
  pred SaverDef'V2 = SaverDef'CheckpointFormatVersion
SaverDef'V1
  pred (SaverDef'CheckpointFormatVersion'Unrecognized _)
    = String -> SaverDef'CheckpointFormatVersion
forall a. HasCallStack => String -> a
Prelude.error
        "SaverDef'CheckpointFormatVersion.pred: bad argument: unrecognized value"
  enumFrom :: SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
enumFrom = SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
forall a. (Enum a, Bounded a) => a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
enumFromTo = SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
forall a. Enum a => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
enumFromThen = SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
forall a. (Enum a, Bounded a) => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo :: SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
enumFromThenTo = SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> SaverDef'CheckpointFormatVersion
-> [SaverDef'CheckpointFormatVersion]
forall a. Enum a => a -> a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault SaverDef'CheckpointFormatVersion where
  fieldDefault :: SaverDef'CheckpointFormatVersion
fieldDefault = SaverDef'CheckpointFormatVersion
SaverDef'LEGACY
instance Control.DeepSeq.NFData SaverDef'CheckpointFormatVersion where
  rnf :: SaverDef'CheckpointFormatVersion -> ()
rnf x__ :: SaverDef'CheckpointFormatVersion
x__ = SaverDef'CheckpointFormatVersion -> () -> ()
forall a b. a -> b -> b
Prelude.seq SaverDef'CheckpointFormatVersion
x__ ()
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = "\n\
    \$tensorflow/core/protobuf/saver.proto\DC2\n\
    \tensorflow\"\137\ETX\n\
    \\bSaverDef\DC20\n\
    \\DC4filename_tensor_name\CAN\SOH \SOH(\tR\DC2filenameTensorName\DC2(\n\
    \\DLEsave_tensor_name\CAN\STX \SOH(\tR\SOsaveTensorName\DC2&\n\
    \\SIrestore_op_name\CAN\ETX \SOH(\tR\rrestoreOpName\DC2\RS\n\
    \\vmax_to_keep\CAN\EOT \SOH(\ENQR\tmaxToKeep\DC2\CAN\n\
    \\asharded\CAN\ENQ \SOH(\bR\asharded\DC2@\n\
    \\GSkeep_checkpoint_every_n_hours\CAN\ACK \SOH(\STXR\EMkeepCheckpointEveryNHours\DC2F\n\
    \\aversion\CAN\a \SOH(\SO2,.tensorflow.SaverDef.CheckpointFormatVersionR\aversion\"5\n\
    \\ETBCheckpointFormatVersion\DC2\n\
    \\n\
    \\ACKLEGACY\DLE\NUL\DC2\ACK\n\
    \\STXV1\DLE\SOH\DC2\ACK\n\
    \\STXV2\DLE\STXBq\n\
    \\DC3org.tensorflow.utilB\vSaverProtosP\SOHZHgithub.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto\248\SOH\SOHJ\149\SO\n\
    \\ACK\DC2\EOT\NUL\NUL/\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\STX\NUL\DC3\n\
    \\b\n\
    \\SOH\b\DC2\ETX\EOT\NUL\US\n\
    \\t\n\
    \\STX\b\US\DC2\ETX\EOT\NUL\US\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ENQ\NUL,\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\ENQ\NUL,\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ACK\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX\ACK\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX\a\NUL,\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\a\NUL,\n\
    \\b\n\
    \\SOH\b\DC2\ETX\b\NUL_\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\b\NUL_\n\
    \H\n\
    \\STX\EOT\NUL\DC2\EOT\v\NUL/\SOH\SUB< Protocol buffer representing the configuration of a Saver.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\v\b\DLE\n\
    \t\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\SO\STX\"\SUBg The name of the tensor in which to specify the filename when saving or\n\
    \ restoring a model checkpoint.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\SO\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\SO\t\GS\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\SO !\n\
    \C\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\DC1\STX\RS\SUB6 The operation to run when saving a model checkpoint.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\DC1\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\DC1\t\EM\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\DC1\FS\GS\n\
    \F\n\
    \\EOT\EOT\NUL\STX\STX\DC2\ETX\DC4\STX\GS\SUB9 The operation to run when restoring a model checkpoint.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX\DC4\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\DC4\t\CAN\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\DC4\ESC\FS\n\
    \X\n\
    \\EOT\EOT\NUL\STX\ETX\DC2\ETX\ETB\STX\CAN\SUBK Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\ETB\STX\a\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\ETB\b\DC3\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\ETB\SYN\ETB\n\
    \L\n\
    \\EOT\EOT\NUL\STX\EOT\DC2\ETX\SUB\STX\DC3\SUB? Shard the save files, one per device that has Variable nodes.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\ENQ\DC2\ETX\SUB\STX\ACK\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\SOH\DC2\ETX\SUB\a\SO\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\ETX\DC2\ETX\SUB\DC1\DC2\n\
    \\144\STX\n\
    \\EOT\EOT\NUL\STX\ENQ\DC2\ETX \STX*\SUB\130\STX How often to keep an additional checkpoint. If not specified, only the last\n\
    \ \"max_to_keep\" checkpoints are kept; if specified, in addition to keeping\n\
    \ the last \"max_to_keep\" checkpoints, an additional checkpoint will be kept\n\
    \ for every n hours of training.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\ENQ\DC2\ETX \STX\a\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\SOH\DC2\ETX \b%\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\ETX\DC2\ETX ()\n\
    \\161\STX\n\
    \\EOT\EOT\NUL\EOT\NUL\DC2\EOT&\STX-\ETX\SUB\146\STX A version number that identifies a different on-disk checkpoint format.\n\
    \ Usually, each subclass of BaseSaverBuilder works with a particular\n\
    \ version/format.  However, it is possible that the same builder may be\n\
    \ upgraded to support a newer checkpoint format in the future.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\EOT\NUL\SOH\DC2\ETX&\a\RS\n\
    \(\n\
    \\ACK\EOT\NUL\EOT\NUL\STX\NUL\DC2\ETX(\EOT\SI\SUB\EM Internal legacy format.\n\
    \\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\NUL\SOH\DC2\ETX(\EOT\n\
    \\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\NUL\STX\DC2\ETX(\r\SO\n\
    \Y\n\
    \\ACK\EOT\NUL\EOT\NUL\STX\SOH\DC2\ETX*\EOT\v\SUBJ Deprecated format: tf.Saver() which works with tensorflow::table::Table.\n\
    \\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\SOH\SOH\DC2\ETX*\EOT\ACK\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\SOH\STX\DC2\ETX*\t\n\
    \\n\
    \0\n\
    \\ACK\EOT\NUL\EOT\NUL\STX\STX\DC2\ETX,\EOT\v\SUB! Current format: more efficient.\n\
    \\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\STX\SOH\DC2\ETX,\EOT\ACK\n\
    \\SO\n\
    \\a\EOT\NUL\EOT\NUL\STX\STX\STX\DC2\ETX,\t\n\
    \\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\ACK\DC2\ETX.\STX&\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ACK\ACK\DC2\ETX.\STX\EM\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ACK\SOH\DC2\ETX.\SUB!\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ACK\ETX\DC2\ETX.$%b\ACKproto3"