{-# 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.Util.SavedTensorSlice (
SavedSlice(), SavedSliceMeta(), SavedTensorSliceMeta(),
SavedTensorSlices()
) 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
import qualified Proto.Tensorflow.Core.Framework.Tensor
import qualified Proto.Tensorflow.Core.Framework.TensorShape
import qualified Proto.Tensorflow.Core.Framework.TensorSlice
import qualified Proto.Tensorflow.Core.Framework.Types
import qualified Proto.Tensorflow.Core.Framework.Versions
data SavedSlice
= SavedSlice'_constructor {SavedSlice -> Text
_SavedSlice'name :: !Data.Text.Text,
SavedSlice -> Maybe TensorSliceProto
_SavedSlice'slice :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto),
SavedSlice -> Maybe TensorProto
_SavedSlice'data' :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.Tensor.TensorProto),
SavedSlice -> FieldSet
_SavedSlice'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (SavedSlice -> SavedSlice -> Bool
(SavedSlice -> SavedSlice -> Bool)
-> (SavedSlice -> SavedSlice -> Bool) -> Eq SavedSlice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavedSlice -> SavedSlice -> Bool
$c/= :: SavedSlice -> SavedSlice -> Bool
== :: SavedSlice -> SavedSlice -> Bool
$c== :: SavedSlice -> SavedSlice -> Bool
Prelude.Eq, Eq SavedSlice
Eq SavedSlice =>
(SavedSlice -> SavedSlice -> Ordering)
-> (SavedSlice -> SavedSlice -> Bool)
-> (SavedSlice -> SavedSlice -> Bool)
-> (SavedSlice -> SavedSlice -> Bool)
-> (SavedSlice -> SavedSlice -> Bool)
-> (SavedSlice -> SavedSlice -> SavedSlice)
-> (SavedSlice -> SavedSlice -> SavedSlice)
-> Ord SavedSlice
SavedSlice -> SavedSlice -> Bool
SavedSlice -> SavedSlice -> Ordering
SavedSlice -> SavedSlice -> SavedSlice
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 :: SavedSlice -> SavedSlice -> SavedSlice
$cmin :: SavedSlice -> SavedSlice -> SavedSlice
max :: SavedSlice -> SavedSlice -> SavedSlice
$cmax :: SavedSlice -> SavedSlice -> SavedSlice
>= :: SavedSlice -> SavedSlice -> Bool
$c>= :: SavedSlice -> SavedSlice -> Bool
> :: SavedSlice -> SavedSlice -> Bool
$c> :: SavedSlice -> SavedSlice -> Bool
<= :: SavedSlice -> SavedSlice -> Bool
$c<= :: SavedSlice -> SavedSlice -> Bool
< :: SavedSlice -> SavedSlice -> Bool
$c< :: SavedSlice -> SavedSlice -> Bool
compare :: SavedSlice -> SavedSlice -> Ordering
$ccompare :: SavedSlice -> SavedSlice -> Ordering
$cp1Ord :: Eq SavedSlice
Prelude.Ord)
instance Prelude.Show SavedSlice where
showsPrec :: Int -> SavedSlice -> ShowS
showsPrec _ __x :: SavedSlice
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(SavedSlice -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SavedSlice
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SavedSlice "name" Data.Text.Text where
fieldOf :: Proxy# "name" -> (Text -> f Text) -> SavedSlice -> f SavedSlice
fieldOf _
= ((Text -> f Text) -> SavedSlice -> f SavedSlice)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> SavedSlice
-> f SavedSlice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSlice -> Text)
-> (SavedSlice -> Text -> SavedSlice)
-> Lens SavedSlice SavedSlice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> Text
_SavedSlice'name (\ x__ :: SavedSlice
x__ y__ :: Text
y__ -> SavedSlice
x__ {_SavedSlice'name :: Text
_SavedSlice'name = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedSlice "slice" Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto where
fieldOf :: Proxy# "slice"
-> (TensorSliceProto -> f TensorSliceProto)
-> SavedSlice
-> f SavedSlice
fieldOf _
= ((Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> SavedSlice -> f SavedSlice)
-> ((TensorSliceProto -> f TensorSliceProto)
-> Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> (TensorSliceProto -> f TensorSliceProto)
-> SavedSlice
-> f SavedSlice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSlice -> Maybe TensorSliceProto)
-> (SavedSlice -> Maybe TensorSliceProto -> SavedSlice)
-> Lens
SavedSlice
SavedSlice
(Maybe TensorSliceProto)
(Maybe TensorSliceProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> Maybe TensorSliceProto
_SavedSlice'slice (\ x__ :: SavedSlice
x__ y__ :: Maybe TensorSliceProto
y__ -> SavedSlice
x__ {_SavedSlice'slice :: Maybe TensorSliceProto
_SavedSlice'slice = Maybe TensorSliceProto
y__}))
(TensorSliceProto -> Lens' (Maybe TensorSliceProto) TensorSliceProto
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TensorSliceProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedSlice "maybe'slice" (Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto) where
fieldOf :: Proxy# "maybe'slice"
-> (Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> SavedSlice
-> f SavedSlice
fieldOf _
= ((Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> SavedSlice -> f SavedSlice)
-> ((Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> (Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> SavedSlice
-> f SavedSlice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSlice -> Maybe TensorSliceProto)
-> (SavedSlice -> Maybe TensorSliceProto -> SavedSlice)
-> Lens
SavedSlice
SavedSlice
(Maybe TensorSliceProto)
(Maybe TensorSliceProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> Maybe TensorSliceProto
_SavedSlice'slice (\ x__ :: SavedSlice
x__ y__ :: Maybe TensorSliceProto
y__ -> SavedSlice
x__ {_SavedSlice'slice :: Maybe TensorSliceProto
_SavedSlice'slice = Maybe TensorSliceProto
y__}))
(Maybe TensorSliceProto -> f (Maybe TensorSliceProto))
-> Maybe TensorSliceProto -> f (Maybe TensorSliceProto)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedSlice "data'" Proto.Tensorflow.Core.Framework.Tensor.TensorProto where
fieldOf :: Proxy# "data'"
-> (TensorProto -> f TensorProto) -> SavedSlice -> f SavedSlice
fieldOf _
= ((Maybe TensorProto -> f (Maybe TensorProto))
-> SavedSlice -> f SavedSlice)
-> ((TensorProto -> f TensorProto)
-> Maybe TensorProto -> f (Maybe TensorProto))
-> (TensorProto -> f TensorProto)
-> SavedSlice
-> f SavedSlice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSlice -> Maybe TensorProto)
-> (SavedSlice -> Maybe TensorProto -> SavedSlice)
-> Lens
SavedSlice SavedSlice (Maybe TensorProto) (Maybe TensorProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> Maybe TensorProto
_SavedSlice'data' (\ x__ :: SavedSlice
x__ y__ :: Maybe TensorProto
y__ -> SavedSlice
x__ {_SavedSlice'data' :: Maybe TensorProto
_SavedSlice'data' = Maybe TensorProto
y__}))
(TensorProto -> Lens' (Maybe TensorProto) TensorProto
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TensorProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedSlice "maybe'data'" (Prelude.Maybe Proto.Tensorflow.Core.Framework.Tensor.TensorProto) where
fieldOf :: Proxy# "maybe'data'"
-> (Maybe TensorProto -> f (Maybe TensorProto))
-> SavedSlice
-> f SavedSlice
fieldOf _
= ((Maybe TensorProto -> f (Maybe TensorProto))
-> SavedSlice -> f SavedSlice)
-> ((Maybe TensorProto -> f (Maybe TensorProto))
-> Maybe TensorProto -> f (Maybe TensorProto))
-> (Maybe TensorProto -> f (Maybe TensorProto))
-> SavedSlice
-> f SavedSlice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSlice -> Maybe TensorProto)
-> (SavedSlice -> Maybe TensorProto -> SavedSlice)
-> Lens
SavedSlice SavedSlice (Maybe TensorProto) (Maybe TensorProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> Maybe TensorProto
_SavedSlice'data' (\ x__ :: SavedSlice
x__ y__ :: Maybe TensorProto
y__ -> SavedSlice
x__ {_SavedSlice'data' :: Maybe TensorProto
_SavedSlice'data' = Maybe TensorProto
y__}))
(Maybe TensorProto -> f (Maybe TensorProto))
-> Maybe TensorProto -> f (Maybe TensorProto)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SavedSlice where
messageName :: Proxy SavedSlice -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SavedSlice"
packedMessageDescriptor :: Proxy SavedSlice -> ByteString
packedMessageDescriptor _
= "\n\
\\n\
\SavedSlice\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC22\n\
\\ENQslice\CAN\STX \SOH(\v2\FS.tensorflow.TensorSliceProtoR\ENQslice\DC2+\n\
\\EOTdata\CAN\ETX \SOH(\v2\ETB.tensorflow.TensorProtoR\EOTdata"
packedFileDescriptor :: Proxy SavedSlice -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor SavedSlice)
fieldsByTag
= let
name__field_descriptor :: FieldDescriptor SavedSlice
name__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor SavedSlice Text
-> FieldDescriptor SavedSlice
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"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 SavedSlice SavedSlice Text Text
-> FieldAccessor SavedSlice 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 "name" 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 @"name")) ::
Data.ProtoLens.FieldDescriptor SavedSlice
slice__field_descriptor :: FieldDescriptor SavedSlice
slice__field_descriptor
= String
-> FieldTypeDescriptor TensorSliceProto
-> FieldAccessor SavedSlice TensorSliceProto
-> FieldDescriptor SavedSlice
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"slice"
(MessageOrGroup -> FieldTypeDescriptor TensorSliceProto
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto)
(Lens
SavedSlice
SavedSlice
(Maybe TensorSliceProto)
(Maybe TensorSliceProto)
-> FieldAccessor SavedSlice TensorSliceProto
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'slice" 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 @"maybe'slice")) ::
Data.ProtoLens.FieldDescriptor SavedSlice
data'__field_descriptor :: FieldDescriptor SavedSlice
data'__field_descriptor
= String
-> FieldTypeDescriptor TensorProto
-> FieldAccessor SavedSlice TensorProto
-> FieldDescriptor SavedSlice
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(MessageOrGroup -> FieldTypeDescriptor TensorProto
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Tensor.TensorProto)
(Lens SavedSlice SavedSlice (Maybe TensorProto) (Maybe TensorProto)
-> FieldAccessor SavedSlice TensorProto
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'data'" 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 @"maybe'data'")) ::
Data.ProtoLens.FieldDescriptor SavedSlice
in
[(Tag, FieldDescriptor SavedSlice)]
-> Map Tag (FieldDescriptor SavedSlice)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SavedSlice
name__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SavedSlice
slice__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor SavedSlice
data'__field_descriptor)]
unknownFields :: LensLike' f SavedSlice FieldSet
unknownFields
= (SavedSlice -> FieldSet)
-> (SavedSlice -> FieldSet -> SavedSlice)
-> Lens' SavedSlice FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSlice -> FieldSet
_SavedSlice'_unknownFields
(\ x__ :: SavedSlice
x__ y__ :: FieldSet
y__ -> SavedSlice
x__ {_SavedSlice'_unknownFields :: FieldSet
_SavedSlice'_unknownFields = FieldSet
y__})
defMessage :: SavedSlice
defMessage
= $WSavedSlice'_constructor :: Text
-> Maybe TensorSliceProto
-> Maybe TensorProto
-> FieldSet
-> SavedSlice
SavedSlice'_constructor
{_SavedSlice'name :: Text
_SavedSlice'name = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_SavedSlice'slice :: Maybe TensorSliceProto
_SavedSlice'slice = Maybe TensorSliceProto
forall a. Maybe a
Prelude.Nothing,
_SavedSlice'data' :: Maybe TensorProto
_SavedSlice'data' = Maybe TensorProto
forall a. Maybe a
Prelude.Nothing,
_SavedSlice'_unknownFields :: FieldSet
_SavedSlice'_unknownFields = []}
parseMessage :: Parser SavedSlice
parseMessage
= let
loop ::
SavedSlice -> Data.ProtoLens.Encoding.Bytes.Parser SavedSlice
loop :: SavedSlice -> Parser SavedSlice
loop x :: SavedSlice
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]))))
SavedSlice -> Parser SavedSlice
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter SavedSlice SavedSlice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedSlice -> SavedSlice
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 SavedSlice SavedSlice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SavedSlice
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))
"name"
SavedSlice -> Parser SavedSlice
loop (Setter SavedSlice SavedSlice Text Text
-> Text -> SavedSlice -> SavedSlice
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "name" 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 @"name") Text
y SavedSlice
x)
18
-> do TensorSliceProto
y <- Parser TensorSliceProto -> String -> Parser TensorSliceProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser TensorSliceProto -> Parser TensorSliceProto
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TensorSliceProto
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"slice"
SavedSlice -> Parser SavedSlice
loop (Setter SavedSlice SavedSlice TensorSliceProto TensorSliceProto
-> TensorSliceProto -> SavedSlice -> SavedSlice
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "slice" 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 @"slice") TensorSliceProto
y SavedSlice
x)
26
-> do TensorProto
y <- Parser TensorProto -> String -> Parser TensorProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser TensorProto -> Parser TensorProto
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TensorProto
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"data"
SavedSlice -> Parser SavedSlice
loop (Setter SavedSlice SavedSlice TensorProto TensorProto
-> TensorProto -> SavedSlice -> SavedSlice
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") TensorProto
y SavedSlice
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
SavedSlice -> Parser SavedSlice
loop
(Setter SavedSlice SavedSlice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedSlice -> SavedSlice
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 SavedSlice SavedSlice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SavedSlice
x)
in
Parser SavedSlice -> String -> Parser SavedSlice
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do SavedSlice -> Parser SavedSlice
loop SavedSlice
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SavedSlice"
buildMessage :: SavedSlice -> Builder
buildMessage
= \ _x :: SavedSlice
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text SavedSlice SavedSlice Text Text -> SavedSlice -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "name" 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 @"name") SavedSlice
_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.<>)
(case
FoldLike
(Maybe TensorSliceProto)
SavedSlice
SavedSlice
(Maybe TensorSliceProto)
(Maybe TensorSliceProto)
-> SavedSlice -> Maybe TensorSliceProto
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'slice" 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 @"maybe'slice") SavedSlice
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: TensorSliceProto
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (TensorSliceProto -> ByteString) -> TensorSliceProto -> 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))
TensorSliceProto -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
TensorSliceProto
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe TensorProto)
SavedSlice
SavedSlice
(Maybe TensorProto)
(Maybe TensorProto)
-> SavedSlice -> Maybe TensorProto
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'data'" 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 @"maybe'data'") SavedSlice
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: TensorProto
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (TensorProto -> ByteString) -> TensorProto -> 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))
TensorProto -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
TensorProto
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet SavedSlice SavedSlice FieldSet FieldSet
-> SavedSlice -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SavedSlice SavedSlice FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SavedSlice
_x))))
instance Control.DeepSeq.NFData SavedSlice where
rnf :: SavedSlice -> ()
rnf
= \ x__ :: SavedSlice
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSlice -> FieldSet
_SavedSlice'_unknownFields SavedSlice
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSlice -> Text
_SavedSlice'name SavedSlice
x__)
(Maybe TensorSliceProto -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSlice -> Maybe TensorSliceProto
_SavedSlice'slice SavedSlice
x__)
(Maybe TensorProto -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SavedSlice -> Maybe TensorProto
_SavedSlice'data' SavedSlice
x__) ())))
data SavedSliceMeta
= SavedSliceMeta'_constructor {SavedSliceMeta -> Text
_SavedSliceMeta'name :: !Data.Text.Text,
SavedSliceMeta -> Maybe TensorShapeProto
_SavedSliceMeta'shape :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto),
SavedSliceMeta -> DataType
_SavedSliceMeta'type' :: !Proto.Tensorflow.Core.Framework.Types.DataType,
SavedSliceMeta -> Vector TensorSliceProto
_SavedSliceMeta'slice :: !(Data.Vector.Vector Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto),
SavedSliceMeta -> FieldSet
_SavedSliceMeta'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (SavedSliceMeta -> SavedSliceMeta -> Bool
(SavedSliceMeta -> SavedSliceMeta -> Bool)
-> (SavedSliceMeta -> SavedSliceMeta -> Bool) -> Eq SavedSliceMeta
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c/= :: SavedSliceMeta -> SavedSliceMeta -> Bool
== :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c== :: SavedSliceMeta -> SavedSliceMeta -> Bool
Prelude.Eq, Eq SavedSliceMeta
Eq SavedSliceMeta =>
(SavedSliceMeta -> SavedSliceMeta -> Ordering)
-> (SavedSliceMeta -> SavedSliceMeta -> Bool)
-> (SavedSliceMeta -> SavedSliceMeta -> Bool)
-> (SavedSliceMeta -> SavedSliceMeta -> Bool)
-> (SavedSliceMeta -> SavedSliceMeta -> Bool)
-> (SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta)
-> (SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta)
-> Ord SavedSliceMeta
SavedSliceMeta -> SavedSliceMeta -> Bool
SavedSliceMeta -> SavedSliceMeta -> Ordering
SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta
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 :: SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta
$cmin :: SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta
max :: SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta
$cmax :: SavedSliceMeta -> SavedSliceMeta -> SavedSliceMeta
>= :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c>= :: SavedSliceMeta -> SavedSliceMeta -> Bool
> :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c> :: SavedSliceMeta -> SavedSliceMeta -> Bool
<= :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c<= :: SavedSliceMeta -> SavedSliceMeta -> Bool
< :: SavedSliceMeta -> SavedSliceMeta -> Bool
$c< :: SavedSliceMeta -> SavedSliceMeta -> Bool
compare :: SavedSliceMeta -> SavedSliceMeta -> Ordering
$ccompare :: SavedSliceMeta -> SavedSliceMeta -> Ordering
$cp1Ord :: Eq SavedSliceMeta
Prelude.Ord)
instance Prelude.Show SavedSliceMeta where
showsPrec :: Int -> SavedSliceMeta -> ShowS
showsPrec _ __x :: SavedSliceMeta
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(SavedSliceMeta -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SavedSliceMeta
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SavedSliceMeta "name" Data.Text.Text where
fieldOf :: Proxy# "name"
-> (Text -> f Text) -> SavedSliceMeta -> f SavedSliceMeta
fieldOf _
= ((Text -> f Text) -> SavedSliceMeta -> f SavedSliceMeta)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> Text)
-> (SavedSliceMeta -> Text -> SavedSliceMeta)
-> Lens SavedSliceMeta SavedSliceMeta Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> Text
_SavedSliceMeta'name
(\ x__ :: SavedSliceMeta
x__ y__ :: Text
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'name :: Text
_SavedSliceMeta'name = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedSliceMeta "shape" Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto where
fieldOf :: Proxy# "shape"
-> (TensorShapeProto -> f TensorShapeProto)
-> SavedSliceMeta
-> f SavedSliceMeta
fieldOf _
= ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> SavedSliceMeta -> f SavedSliceMeta)
-> ((TensorShapeProto -> f TensorShapeProto)
-> Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> (TensorShapeProto -> f TensorShapeProto)
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> Maybe TensorShapeProto)
-> (SavedSliceMeta -> Maybe TensorShapeProto -> SavedSliceMeta)
-> Lens
SavedSliceMeta
SavedSliceMeta
(Maybe TensorShapeProto)
(Maybe TensorShapeProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> Maybe TensorShapeProto
_SavedSliceMeta'shape
(\ x__ :: SavedSliceMeta
x__ y__ :: Maybe TensorShapeProto
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'shape :: Maybe TensorShapeProto
_SavedSliceMeta'shape = Maybe TensorShapeProto
y__}))
(TensorShapeProto -> Lens' (Maybe TensorShapeProto) TensorShapeProto
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TensorShapeProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedSliceMeta "maybe'shape" (Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto) where
fieldOf :: Proxy# "maybe'shape"
-> (Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> SavedSliceMeta
-> f SavedSliceMeta
fieldOf _
= ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> SavedSliceMeta -> f SavedSliceMeta)
-> ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> (Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> Maybe TensorShapeProto)
-> (SavedSliceMeta -> Maybe TensorShapeProto -> SavedSliceMeta)
-> Lens
SavedSliceMeta
SavedSliceMeta
(Maybe TensorShapeProto)
(Maybe TensorShapeProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> Maybe TensorShapeProto
_SavedSliceMeta'shape
(\ x__ :: SavedSliceMeta
x__ y__ :: Maybe TensorShapeProto
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'shape :: Maybe TensorShapeProto
_SavedSliceMeta'shape = Maybe TensorShapeProto
y__}))
(Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> Maybe TensorShapeProto -> f (Maybe TensorShapeProto)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedSliceMeta "type'" Proto.Tensorflow.Core.Framework.Types.DataType where
fieldOf :: Proxy# "type'"
-> (DataType -> f DataType) -> SavedSliceMeta -> f SavedSliceMeta
fieldOf _
= ((DataType -> f DataType) -> SavedSliceMeta -> f SavedSliceMeta)
-> ((DataType -> f DataType) -> DataType -> f DataType)
-> (DataType -> f DataType)
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> DataType)
-> (SavedSliceMeta -> DataType -> SavedSliceMeta)
-> Lens SavedSliceMeta SavedSliceMeta DataType DataType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> DataType
_SavedSliceMeta'type'
(\ x__ :: SavedSliceMeta
x__ y__ :: DataType
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'type' :: DataType
_SavedSliceMeta'type' = DataType
y__}))
(DataType -> f DataType) -> DataType -> f DataType
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedSliceMeta "slice" [Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto] where
fieldOf :: Proxy# "slice"
-> ([TensorSliceProto] -> f [TensorSliceProto])
-> SavedSliceMeta
-> f SavedSliceMeta
fieldOf _
= ((Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> SavedSliceMeta -> f SavedSliceMeta)
-> (([TensorSliceProto] -> f [TensorSliceProto])
-> Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> ([TensorSliceProto] -> f [TensorSliceProto])
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> Vector TensorSliceProto)
-> (SavedSliceMeta -> Vector TensorSliceProto -> SavedSliceMeta)
-> Lens
SavedSliceMeta
SavedSliceMeta
(Vector TensorSliceProto)
(Vector TensorSliceProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> Vector TensorSliceProto
_SavedSliceMeta'slice
(\ x__ :: SavedSliceMeta
x__ y__ :: Vector TensorSliceProto
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'slice :: Vector TensorSliceProto
_SavedSliceMeta'slice = Vector TensorSliceProto
y__}))
((Vector TensorSliceProto -> [TensorSliceProto])
-> (Vector TensorSliceProto
-> [TensorSliceProto] -> Vector TensorSliceProto)
-> Lens
(Vector TensorSliceProto)
(Vector TensorSliceProto)
[TensorSliceProto]
[TensorSliceProto]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector TensorSliceProto -> [TensorSliceProto]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [TensorSliceProto]
y__ -> [TensorSliceProto] -> Vector TensorSliceProto
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TensorSliceProto]
y__))
instance Data.ProtoLens.Field.HasField SavedSliceMeta "vec'slice" (Data.Vector.Vector Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto) where
fieldOf :: Proxy# "vec'slice"
-> (Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> SavedSliceMeta
-> f SavedSliceMeta
fieldOf _
= ((Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> SavedSliceMeta -> f SavedSliceMeta)
-> ((Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> (Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> SavedSliceMeta
-> f SavedSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedSliceMeta -> Vector TensorSliceProto)
-> (SavedSliceMeta -> Vector TensorSliceProto -> SavedSliceMeta)
-> Lens
SavedSliceMeta
SavedSliceMeta
(Vector TensorSliceProto)
(Vector TensorSliceProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> Vector TensorSliceProto
_SavedSliceMeta'slice
(\ x__ :: SavedSliceMeta
x__ y__ :: Vector TensorSliceProto
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'slice :: Vector TensorSliceProto
_SavedSliceMeta'slice = Vector TensorSliceProto
y__}))
(Vector TensorSliceProto -> f (Vector TensorSliceProto))
-> Vector TensorSliceProto -> f (Vector TensorSliceProto)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SavedSliceMeta where
messageName :: Proxy SavedSliceMeta -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SavedSliceMeta"
packedMessageDescriptor :: Proxy SavedSliceMeta -> ByteString
packedMessageDescriptor _
= "\n\
\\SOSavedSliceMeta\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC22\n\
\\ENQshape\CAN\STX \SOH(\v2\FS.tensorflow.TensorShapeProtoR\ENQshape\DC2(\n\
\\EOTtype\CAN\ETX \SOH(\SO2\DC4.tensorflow.DataTypeR\EOTtype\DC22\n\
\\ENQslice\CAN\EOT \ETX(\v2\FS.tensorflow.TensorSliceProtoR\ENQslice"
packedFileDescriptor :: Proxy SavedSliceMeta -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor SavedSliceMeta)
fieldsByTag
= let
name__field_descriptor :: FieldDescriptor SavedSliceMeta
name__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor SavedSliceMeta Text
-> FieldDescriptor SavedSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"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 SavedSliceMeta SavedSliceMeta Text Text
-> FieldAccessor SavedSliceMeta 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 "name" 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 @"name")) ::
Data.ProtoLens.FieldDescriptor SavedSliceMeta
shape__field_descriptor :: FieldDescriptor SavedSliceMeta
shape__field_descriptor
= String
-> FieldTypeDescriptor TensorShapeProto
-> FieldAccessor SavedSliceMeta TensorShapeProto
-> FieldDescriptor SavedSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"shape"
(MessageOrGroup -> FieldTypeDescriptor TensorShapeProto
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)
(Lens
SavedSliceMeta
SavedSliceMeta
(Maybe TensorShapeProto)
(Maybe TensorShapeProto)
-> FieldAccessor SavedSliceMeta TensorShapeProto
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'shape" 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 @"maybe'shape")) ::
Data.ProtoLens.FieldDescriptor SavedSliceMeta
type'__field_descriptor :: FieldDescriptor SavedSliceMeta
type'__field_descriptor
= String
-> FieldTypeDescriptor DataType
-> FieldAccessor SavedSliceMeta DataType
-> FieldDescriptor SavedSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"type"
(ScalarField DataType -> FieldTypeDescriptor DataType
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField DataType
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Types.DataType)
(WireDefault DataType
-> Lens SavedSliceMeta SavedSliceMeta DataType DataType
-> FieldAccessor SavedSliceMeta DataType
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault DataType
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'")) ::
Data.ProtoLens.FieldDescriptor SavedSliceMeta
slice__field_descriptor :: FieldDescriptor SavedSliceMeta
slice__field_descriptor
= String
-> FieldTypeDescriptor TensorSliceProto
-> FieldAccessor SavedSliceMeta TensorSliceProto
-> FieldDescriptor SavedSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"slice"
(MessageOrGroup -> FieldTypeDescriptor TensorSliceProto
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto)
(Packing
-> Lens' SavedSliceMeta [TensorSliceProto]
-> FieldAccessor SavedSliceMeta TensorSliceProto
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "slice" 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 @"slice")) ::
Data.ProtoLens.FieldDescriptor SavedSliceMeta
in
[(Tag, FieldDescriptor SavedSliceMeta)]
-> Map Tag (FieldDescriptor SavedSliceMeta)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SavedSliceMeta
name__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SavedSliceMeta
shape__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor SavedSliceMeta
type'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor SavedSliceMeta
slice__field_descriptor)]
unknownFields :: LensLike' f SavedSliceMeta FieldSet
unknownFields
= (SavedSliceMeta -> FieldSet)
-> (SavedSliceMeta -> FieldSet -> SavedSliceMeta)
-> Lens' SavedSliceMeta FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedSliceMeta -> FieldSet
_SavedSliceMeta'_unknownFields
(\ x__ :: SavedSliceMeta
x__ y__ :: FieldSet
y__ -> SavedSliceMeta
x__ {_SavedSliceMeta'_unknownFields :: FieldSet
_SavedSliceMeta'_unknownFields = FieldSet
y__})
defMessage :: SavedSliceMeta
defMessage
= $WSavedSliceMeta'_constructor :: Text
-> Maybe TensorShapeProto
-> DataType
-> Vector TensorSliceProto
-> FieldSet
-> SavedSliceMeta
SavedSliceMeta'_constructor
{_SavedSliceMeta'name :: Text
_SavedSliceMeta'name = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_SavedSliceMeta'shape :: Maybe TensorShapeProto
_SavedSliceMeta'shape = Maybe TensorShapeProto
forall a. Maybe a
Prelude.Nothing,
_SavedSliceMeta'type' :: DataType
_SavedSliceMeta'type' = DataType
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_SavedSliceMeta'slice :: Vector TensorSliceProto
_SavedSliceMeta'slice = Vector TensorSliceProto
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_SavedSliceMeta'_unknownFields :: FieldSet
_SavedSliceMeta'_unknownFields = []}
parseMessage :: Parser SavedSliceMeta
parseMessage
= let
loop ::
SavedSliceMeta
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto
-> Data.ProtoLens.Encoding.Bytes.Parser SavedSliceMeta
loop :: SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop x :: SavedSliceMeta
x mutable'slice :: Growing Vector RealWorld TensorSliceProto
mutable'slice
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector TensorSliceProto
frozen'slice <- IO (Vector TensorSliceProto) -> Parser (Vector TensorSliceProto)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) TensorSliceProto
-> IO (Vector TensorSliceProto)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze Growing Vector RealWorld TensorSliceProto
Growing Vector (PrimState IO) TensorSliceProto
mutable'slice)
(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]))))
SavedSliceMeta -> Parser SavedSliceMeta
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter SavedSliceMeta SavedSliceMeta FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedSliceMeta -> SavedSliceMeta
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 SavedSliceMeta SavedSliceMeta FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
SavedSliceMeta
SavedSliceMeta
(Vector TensorSliceProto)
(Vector TensorSliceProto)
-> Vector TensorSliceProto -> SavedSliceMeta -> SavedSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'slice" 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 @"vec'slice") Vector TensorSliceProto
frozen'slice SavedSliceMeta
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))
"name"
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop
(Setter SavedSliceMeta SavedSliceMeta Text Text
-> Text -> SavedSliceMeta -> SavedSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "name" 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 @"name") Text
y SavedSliceMeta
x)
Growing Vector RealWorld TensorSliceProto
mutable'slice
18
-> do TensorShapeProto
y <- Parser TensorShapeProto -> String -> Parser TensorShapeProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser TensorShapeProto -> Parser TensorShapeProto
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TensorShapeProto
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"shape"
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop
(Setter
SavedSliceMeta SavedSliceMeta TensorShapeProto TensorShapeProto
-> TensorShapeProto -> SavedSliceMeta -> SavedSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "shape" 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 @"shape") TensorShapeProto
y SavedSliceMeta
x)
Growing Vector RealWorld TensorSliceProto
mutable'slice
24
-> do DataType
y <- Parser DataType -> String -> Parser DataType
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Int -> DataType) -> Parser Int -> Parser DataType
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Int -> DataType
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))
"type"
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop
(Setter SavedSliceMeta SavedSliceMeta DataType DataType
-> DataType -> SavedSliceMeta -> SavedSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") DataType
y SavedSliceMeta
x)
Growing Vector RealWorld TensorSliceProto
mutable'slice
34
-> do !TensorSliceProto
y <- Parser TensorSliceProto -> String -> Parser TensorSliceProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser TensorSliceProto -> Parser TensorSliceProto
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Parser TensorSliceProto
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"slice"
Growing Vector RealWorld TensorSliceProto
v <- IO (Growing Vector RealWorld TensorSliceProto)
-> Parser (Growing Vector RealWorld TensorSliceProto)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) TensorSliceProto
-> TensorSliceProto
-> IO (Growing Vector (PrimState IO) TensorSliceProto)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld TensorSliceProto
Growing Vector (PrimState IO) TensorSliceProto
mutable'slice TensorSliceProto
y)
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop SavedSliceMeta
x Growing Vector RealWorld TensorSliceProto
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop
(Setter SavedSliceMeta SavedSliceMeta FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedSliceMeta -> SavedSliceMeta
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 SavedSliceMeta SavedSliceMeta FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SavedSliceMeta
x)
Growing Vector RealWorld TensorSliceProto
mutable'slice
in
Parser SavedSliceMeta -> String -> Parser SavedSliceMeta
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld TensorSliceProto
mutable'slice <- IO (Growing Vector RealWorld TensorSliceProto)
-> Parser (Growing Vector RealWorld TensorSliceProto)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld TensorSliceProto)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
SavedSliceMeta
-> Growing Vector RealWorld TensorSliceProto
-> Parser SavedSliceMeta
loop SavedSliceMeta
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld TensorSliceProto
mutable'slice)
"SavedSliceMeta"
buildMessage :: SavedSliceMeta -> Builder
buildMessage
= \ _x :: SavedSliceMeta
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text SavedSliceMeta SavedSliceMeta Text Text
-> SavedSliceMeta -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "name" 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 @"name") SavedSliceMeta
_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.<>)
(case
FoldLike
(Maybe TensorShapeProto)
SavedSliceMeta
SavedSliceMeta
(Maybe TensorShapeProto)
(Maybe TensorShapeProto)
-> SavedSliceMeta -> Maybe TensorShapeProto
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'shape" 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 @"maybe'shape") SavedSliceMeta
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: TensorShapeProto
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (TensorShapeProto -> ByteString) -> TensorShapeProto -> 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))
TensorShapeProto -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
TensorShapeProto
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: DataType
_v = FoldLike DataType SavedSliceMeta SavedSliceMeta DataType DataType
-> SavedSliceMeta -> DataType
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") SavedSliceMeta
_x
in
if DataType -> DataType -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) DataType
_v DataType
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 24)
((Int -> Builder) -> (DataType -> Int) -> DataType -> 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)
DataType -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum
DataType
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((TensorSliceProto -> Builder) -> Vector TensorSliceProto -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: TensorSliceProto
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (TensorSliceProto -> ByteString) -> TensorSliceProto -> 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))
TensorSliceProto -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
TensorSliceProto
_v))
(FoldLike
(Vector TensorSliceProto)
SavedSliceMeta
SavedSliceMeta
(Vector TensorSliceProto)
(Vector TensorSliceProto)
-> SavedSliceMeta -> Vector TensorSliceProto
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'slice" 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 @"vec'slice") SavedSliceMeta
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet SavedSliceMeta SavedSliceMeta FieldSet FieldSet
-> SavedSliceMeta -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SavedSliceMeta SavedSliceMeta FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SavedSliceMeta
_x)))))
instance Control.DeepSeq.NFData SavedSliceMeta where
rnf :: SavedSliceMeta -> ()
rnf
= \ x__ :: SavedSliceMeta
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSliceMeta -> FieldSet
_SavedSliceMeta'_unknownFields SavedSliceMeta
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSliceMeta -> Text
_SavedSliceMeta'name SavedSliceMeta
x__)
(Maybe TensorShapeProto -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSliceMeta -> Maybe TensorShapeProto
_SavedSliceMeta'shape SavedSliceMeta
x__)
(DataType -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedSliceMeta -> DataType
_SavedSliceMeta'type' SavedSliceMeta
x__)
(Vector TensorSliceProto -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SavedSliceMeta -> Vector TensorSliceProto
_SavedSliceMeta'slice SavedSliceMeta
x__) ()))))
data SavedTensorSliceMeta
= SavedTensorSliceMeta'_constructor {SavedTensorSliceMeta -> Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor :: !(Data.Vector.Vector SavedSliceMeta),
SavedTensorSliceMeta -> Maybe VersionDef
_SavedTensorSliceMeta'versions :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.Versions.VersionDef),
SavedTensorSliceMeta -> FieldSet
_SavedTensorSliceMeta'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
(SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> Eq SavedTensorSliceMeta
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c/= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
== :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c== :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
Prelude.Eq, Eq SavedTensorSliceMeta
Eq SavedTensorSliceMeta =>
(SavedTensorSliceMeta -> SavedTensorSliceMeta -> Ordering)
-> (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> (SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool)
-> (SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta)
-> (SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta)
-> Ord SavedTensorSliceMeta
SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
SavedTensorSliceMeta -> SavedTensorSliceMeta -> Ordering
SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta
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 :: SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta
$cmin :: SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta
max :: SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta
$cmax :: SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSliceMeta
>= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c>= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
> :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c> :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
<= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c<= :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
< :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
$c< :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Bool
compare :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Ordering
$ccompare :: SavedTensorSliceMeta -> SavedTensorSliceMeta -> Ordering
$cp1Ord :: Eq SavedTensorSliceMeta
Prelude.Ord)
instance Prelude.Show SavedTensorSliceMeta where
showsPrec :: Int -> SavedTensorSliceMeta -> ShowS
showsPrec _ __x :: SavedTensorSliceMeta
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(SavedTensorSliceMeta -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SavedTensorSliceMeta
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SavedTensorSliceMeta "tensor" [SavedSliceMeta] where
fieldOf :: Proxy# "tensor"
-> ([SavedSliceMeta] -> f [SavedSliceMeta])
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
fieldOf _
= ((Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> (([SavedSliceMeta] -> f [SavedSliceMeta])
-> Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> ([SavedSliceMeta] -> f [SavedSliceMeta])
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSliceMeta -> Vector SavedSliceMeta)
-> (SavedTensorSliceMeta
-> Vector SavedSliceMeta -> SavedTensorSliceMeta)
-> Lens
SavedTensorSliceMeta
SavedTensorSliceMeta
(Vector SavedSliceMeta)
(Vector SavedSliceMeta)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSliceMeta -> Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor
(\ x__ :: SavedTensorSliceMeta
x__ y__ :: Vector SavedSliceMeta
y__ -> SavedTensorSliceMeta
x__ {_SavedTensorSliceMeta'tensor :: Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor = Vector SavedSliceMeta
y__}))
((Vector SavedSliceMeta -> [SavedSliceMeta])
-> (Vector SavedSliceMeta
-> [SavedSliceMeta] -> Vector SavedSliceMeta)
-> Lens
(Vector SavedSliceMeta)
(Vector SavedSliceMeta)
[SavedSliceMeta]
[SavedSliceMeta]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector SavedSliceMeta -> [SavedSliceMeta]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [SavedSliceMeta]
y__ -> [SavedSliceMeta] -> Vector SavedSliceMeta
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [SavedSliceMeta]
y__))
instance Data.ProtoLens.Field.HasField SavedTensorSliceMeta "vec'tensor" (Data.Vector.Vector SavedSliceMeta) where
fieldOf :: Proxy# "vec'tensor"
-> (Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
fieldOf _
= ((Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> ((Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> (Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSliceMeta -> Vector SavedSliceMeta)
-> (SavedTensorSliceMeta
-> Vector SavedSliceMeta -> SavedTensorSliceMeta)
-> Lens
SavedTensorSliceMeta
SavedTensorSliceMeta
(Vector SavedSliceMeta)
(Vector SavedSliceMeta)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSliceMeta -> Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor
(\ x__ :: SavedTensorSliceMeta
x__ y__ :: Vector SavedSliceMeta
y__ -> SavedTensorSliceMeta
x__ {_SavedTensorSliceMeta'tensor :: Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor = Vector SavedSliceMeta
y__}))
(Vector SavedSliceMeta -> f (Vector SavedSliceMeta))
-> Vector SavedSliceMeta -> f (Vector SavedSliceMeta)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedTensorSliceMeta "versions" Proto.Tensorflow.Core.Framework.Versions.VersionDef where
fieldOf :: Proxy# "versions"
-> (VersionDef -> f VersionDef)
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
fieldOf _
= ((Maybe VersionDef -> f (Maybe VersionDef))
-> SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> ((VersionDef -> f VersionDef)
-> Maybe VersionDef -> f (Maybe VersionDef))
-> (VersionDef -> f VersionDef)
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSliceMeta -> Maybe VersionDef)
-> (SavedTensorSliceMeta
-> Maybe VersionDef -> SavedTensorSliceMeta)
-> Lens
SavedTensorSliceMeta
SavedTensorSliceMeta
(Maybe VersionDef)
(Maybe VersionDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSliceMeta -> Maybe VersionDef
_SavedTensorSliceMeta'versions
(\ x__ :: SavedTensorSliceMeta
x__ y__ :: Maybe VersionDef
y__ -> SavedTensorSliceMeta
x__ {_SavedTensorSliceMeta'versions :: Maybe VersionDef
_SavedTensorSliceMeta'versions = Maybe VersionDef
y__}))
(VersionDef -> Lens' (Maybe VersionDef) VersionDef
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens VersionDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedTensorSliceMeta "maybe'versions" (Prelude.Maybe Proto.Tensorflow.Core.Framework.Versions.VersionDef) where
fieldOf :: Proxy# "maybe'versions"
-> (Maybe VersionDef -> f (Maybe VersionDef))
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
fieldOf _
= ((Maybe VersionDef -> f (Maybe VersionDef))
-> SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> ((Maybe VersionDef -> f (Maybe VersionDef))
-> Maybe VersionDef -> f (Maybe VersionDef))
-> (Maybe VersionDef -> f (Maybe VersionDef))
-> SavedTensorSliceMeta
-> f SavedTensorSliceMeta
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSliceMeta -> Maybe VersionDef)
-> (SavedTensorSliceMeta
-> Maybe VersionDef -> SavedTensorSliceMeta)
-> Lens
SavedTensorSliceMeta
SavedTensorSliceMeta
(Maybe VersionDef)
(Maybe VersionDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSliceMeta -> Maybe VersionDef
_SavedTensorSliceMeta'versions
(\ x__ :: SavedTensorSliceMeta
x__ y__ :: Maybe VersionDef
y__ -> SavedTensorSliceMeta
x__ {_SavedTensorSliceMeta'versions :: Maybe VersionDef
_SavedTensorSliceMeta'versions = Maybe VersionDef
y__}))
(Maybe VersionDef -> f (Maybe VersionDef))
-> Maybe VersionDef -> f (Maybe VersionDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SavedTensorSliceMeta where
messageName :: Proxy SavedTensorSliceMeta -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SavedTensorSliceMeta"
packedMessageDescriptor :: Proxy SavedTensorSliceMeta -> ByteString
packedMessageDescriptor _
= "\n\
\\DC4SavedTensorSliceMeta\DC22\n\
\\ACKtensor\CAN\SOH \ETX(\v2\SUB.tensorflow.SavedSliceMetaR\ACKtensor\DC22\n\
\\bversions\CAN\STX \SOH(\v2\SYN.tensorflow.VersionDefR\bversions"
packedFileDescriptor :: Proxy SavedTensorSliceMeta -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor SavedTensorSliceMeta)
fieldsByTag
= let
tensor__field_descriptor :: FieldDescriptor SavedTensorSliceMeta
tensor__field_descriptor
= String
-> FieldTypeDescriptor SavedSliceMeta
-> FieldAccessor SavedTensorSliceMeta SavedSliceMeta
-> FieldDescriptor SavedTensorSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"tensor"
(MessageOrGroup -> FieldTypeDescriptor SavedSliceMeta
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor SavedSliceMeta)
(Packing
-> Lens' SavedTensorSliceMeta [SavedSliceMeta]
-> FieldAccessor SavedTensorSliceMeta SavedSliceMeta
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "tensor" 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 @"tensor")) ::
Data.ProtoLens.FieldDescriptor SavedTensorSliceMeta
versions__field_descriptor :: FieldDescriptor SavedTensorSliceMeta
versions__field_descriptor
= String
-> FieldTypeDescriptor VersionDef
-> FieldAccessor SavedTensorSliceMeta VersionDef
-> FieldDescriptor SavedTensorSliceMeta
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"versions"
(MessageOrGroup -> FieldTypeDescriptor VersionDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Versions.VersionDef)
(Lens
SavedTensorSliceMeta
SavedTensorSliceMeta
(Maybe VersionDef)
(Maybe VersionDef)
-> FieldAccessor SavedTensorSliceMeta VersionDef
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'versions" 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 @"maybe'versions")) ::
Data.ProtoLens.FieldDescriptor SavedTensorSliceMeta
in
[(Tag, FieldDescriptor SavedTensorSliceMeta)]
-> Map Tag (FieldDescriptor SavedTensorSliceMeta)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SavedTensorSliceMeta
tensor__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SavedTensorSliceMeta
versions__field_descriptor)]
unknownFields :: LensLike' f SavedTensorSliceMeta FieldSet
unknownFields
= (SavedTensorSliceMeta -> FieldSet)
-> (SavedTensorSliceMeta -> FieldSet -> SavedTensorSliceMeta)
-> Lens' SavedTensorSliceMeta FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSliceMeta -> FieldSet
_SavedTensorSliceMeta'_unknownFields
(\ x__ :: SavedTensorSliceMeta
x__ y__ :: FieldSet
y__ -> SavedTensorSliceMeta
x__ {_SavedTensorSliceMeta'_unknownFields :: FieldSet
_SavedTensorSliceMeta'_unknownFields = FieldSet
y__})
defMessage :: SavedTensorSliceMeta
defMessage
= $WSavedTensorSliceMeta'_constructor :: Vector SavedSliceMeta
-> Maybe VersionDef -> FieldSet -> SavedTensorSliceMeta
SavedTensorSliceMeta'_constructor
{_SavedTensorSliceMeta'tensor :: Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor = Vector SavedSliceMeta
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_SavedTensorSliceMeta'versions :: Maybe VersionDef
_SavedTensorSliceMeta'versions = Maybe VersionDef
forall a. Maybe a
Prelude.Nothing,
_SavedTensorSliceMeta'_unknownFields :: FieldSet
_SavedTensorSliceMeta'_unknownFields = []}
parseMessage :: Parser SavedTensorSliceMeta
parseMessage
= let
loop ::
SavedTensorSliceMeta
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld SavedSliceMeta
-> Data.ProtoLens.Encoding.Bytes.Parser SavedTensorSliceMeta
loop :: SavedTensorSliceMeta
-> Growing Vector RealWorld SavedSliceMeta
-> Parser SavedTensorSliceMeta
loop x :: SavedTensorSliceMeta
x mutable'tensor :: Growing Vector RealWorld SavedSliceMeta
mutable'tensor
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector SavedSliceMeta
frozen'tensor <- IO (Vector SavedSliceMeta) -> Parser (Vector SavedSliceMeta)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) SavedSliceMeta
-> IO (Vector SavedSliceMeta)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
Growing Vector RealWorld SavedSliceMeta
Growing Vector (PrimState IO) SavedSliceMeta
mutable'tensor)
(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]))))
SavedTensorSliceMeta -> Parser SavedTensorSliceMeta
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter SavedTensorSliceMeta SavedTensorSliceMeta FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> SavedTensorSliceMeta
-> SavedTensorSliceMeta
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 SavedTensorSliceMeta SavedTensorSliceMeta FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
SavedTensorSliceMeta
SavedTensorSliceMeta
(Vector SavedSliceMeta)
(Vector SavedSliceMeta)
-> Vector SavedSliceMeta
-> SavedTensorSliceMeta
-> SavedTensorSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'tensor" 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 @"vec'tensor") Vector SavedSliceMeta
frozen'tensor SavedTensorSliceMeta
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !SavedSliceMeta
y <- Parser SavedSliceMeta -> String -> Parser SavedSliceMeta
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser SavedSliceMeta -> Parser SavedSliceMeta
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Parser SavedSliceMeta
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"tensor"
Growing Vector RealWorld SavedSliceMeta
v <- IO (Growing Vector RealWorld SavedSliceMeta)
-> Parser (Growing Vector RealWorld SavedSliceMeta)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) SavedSliceMeta
-> SavedSliceMeta
-> IO (Growing Vector (PrimState IO) SavedSliceMeta)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld SavedSliceMeta
Growing Vector (PrimState IO) SavedSliceMeta
mutable'tensor SavedSliceMeta
y)
SavedTensorSliceMeta
-> Growing Vector RealWorld SavedSliceMeta
-> Parser SavedTensorSliceMeta
loop SavedTensorSliceMeta
x Growing Vector RealWorld SavedSliceMeta
v
18
-> do VersionDef
y <- Parser VersionDef -> String -> Parser VersionDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser VersionDef -> Parser VersionDef
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser VersionDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"versions"
SavedTensorSliceMeta
-> Growing Vector RealWorld SavedSliceMeta
-> Parser SavedTensorSliceMeta
loop
(Setter
SavedTensorSliceMeta SavedTensorSliceMeta VersionDef VersionDef
-> VersionDef -> SavedTensorSliceMeta -> SavedTensorSliceMeta
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "versions" 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 @"versions") VersionDef
y SavedTensorSliceMeta
x)
Growing Vector RealWorld SavedSliceMeta
mutable'tensor
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
SavedTensorSliceMeta
-> Growing Vector RealWorld SavedSliceMeta
-> Parser SavedTensorSliceMeta
loop
(Setter SavedTensorSliceMeta SavedTensorSliceMeta FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> SavedTensorSliceMeta
-> SavedTensorSliceMeta
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 SavedTensorSliceMeta SavedTensorSliceMeta FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SavedTensorSliceMeta
x)
Growing Vector RealWorld SavedSliceMeta
mutable'tensor
in
Parser SavedTensorSliceMeta
-> String -> Parser SavedTensorSliceMeta
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld SavedSliceMeta
mutable'tensor <- IO (Growing Vector RealWorld SavedSliceMeta)
-> Parser (Growing Vector RealWorld SavedSliceMeta)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld SavedSliceMeta)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
SavedTensorSliceMeta
-> Growing Vector RealWorld SavedSliceMeta
-> Parser SavedTensorSliceMeta
loop SavedTensorSliceMeta
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld SavedSliceMeta
mutable'tensor)
"SavedTensorSliceMeta"
buildMessage :: SavedTensorSliceMeta -> Builder
buildMessage
= \ _x :: SavedTensorSliceMeta
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((SavedSliceMeta -> Builder) -> Vector SavedSliceMeta -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: SavedSliceMeta
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (SavedSliceMeta -> ByteString) -> SavedSliceMeta -> 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))
SavedSliceMeta -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
SavedSliceMeta
_v))
(FoldLike
(Vector SavedSliceMeta)
SavedTensorSliceMeta
SavedTensorSliceMeta
(Vector SavedSliceMeta)
(Vector SavedSliceMeta)
-> SavedTensorSliceMeta -> Vector SavedSliceMeta
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'tensor" 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 @"vec'tensor") SavedTensorSliceMeta
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe VersionDef)
SavedTensorSliceMeta
SavedTensorSliceMeta
(Maybe VersionDef)
(Maybe VersionDef)
-> SavedTensorSliceMeta -> Maybe VersionDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'versions" 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 @"maybe'versions") SavedTensorSliceMeta
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: VersionDef
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (VersionDef -> ByteString) -> VersionDef -> 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))
VersionDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
VersionDef
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
SavedTensorSliceMeta
SavedTensorSliceMeta
FieldSet
FieldSet
-> SavedTensorSliceMeta -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
SavedTensorSliceMeta
SavedTensorSliceMeta
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SavedTensorSliceMeta
_x)))
instance Control.DeepSeq.NFData SavedTensorSliceMeta where
rnf :: SavedTensorSliceMeta -> ()
rnf
= \ x__ :: SavedTensorSliceMeta
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedTensorSliceMeta -> FieldSet
_SavedTensorSliceMeta'_unknownFields SavedTensorSliceMeta
x__)
(Vector SavedSliceMeta -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedTensorSliceMeta -> Vector SavedSliceMeta
_SavedTensorSliceMeta'tensor SavedTensorSliceMeta
x__)
(Maybe VersionDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SavedTensorSliceMeta -> Maybe VersionDef
_SavedTensorSliceMeta'versions SavedTensorSliceMeta
x__) ()))
data SavedTensorSlices
= SavedTensorSlices'_constructor {SavedTensorSlices -> Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta :: !(Prelude.Maybe SavedTensorSliceMeta),
SavedTensorSlices -> Maybe SavedSlice
_SavedTensorSlices'data' :: !(Prelude.Maybe SavedSlice),
SavedTensorSlices -> FieldSet
_SavedTensorSlices'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (SavedTensorSlices -> SavedTensorSlices -> Bool
(SavedTensorSlices -> SavedTensorSlices -> Bool)
-> (SavedTensorSlices -> SavedTensorSlices -> Bool)
-> Eq SavedTensorSlices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c/= :: SavedTensorSlices -> SavedTensorSlices -> Bool
== :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c== :: SavedTensorSlices -> SavedTensorSlices -> Bool
Prelude.Eq, Eq SavedTensorSlices
Eq SavedTensorSlices =>
(SavedTensorSlices -> SavedTensorSlices -> Ordering)
-> (SavedTensorSlices -> SavedTensorSlices -> Bool)
-> (SavedTensorSlices -> SavedTensorSlices -> Bool)
-> (SavedTensorSlices -> SavedTensorSlices -> Bool)
-> (SavedTensorSlices -> SavedTensorSlices -> Bool)
-> (SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices)
-> (SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices)
-> Ord SavedTensorSlices
SavedTensorSlices -> SavedTensorSlices -> Bool
SavedTensorSlices -> SavedTensorSlices -> Ordering
SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices
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 :: SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices
$cmin :: SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices
max :: SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices
$cmax :: SavedTensorSlices -> SavedTensorSlices -> SavedTensorSlices
>= :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c>= :: SavedTensorSlices -> SavedTensorSlices -> Bool
> :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c> :: SavedTensorSlices -> SavedTensorSlices -> Bool
<= :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c<= :: SavedTensorSlices -> SavedTensorSlices -> Bool
< :: SavedTensorSlices -> SavedTensorSlices -> Bool
$c< :: SavedTensorSlices -> SavedTensorSlices -> Bool
compare :: SavedTensorSlices -> SavedTensorSlices -> Ordering
$ccompare :: SavedTensorSlices -> SavedTensorSlices -> Ordering
$cp1Ord :: Eq SavedTensorSlices
Prelude.Ord)
instance Prelude.Show SavedTensorSlices where
showsPrec :: Int -> SavedTensorSlices -> ShowS
showsPrec _ __x :: SavedTensorSlices
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(SavedTensorSlices -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SavedTensorSlices
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SavedTensorSlices "meta" SavedTensorSliceMeta where
fieldOf :: Proxy# "meta"
-> (SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> SavedTensorSlices
-> f SavedTensorSlices
fieldOf _
= ((Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> SavedTensorSlices -> f SavedTensorSlices)
-> ((SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> (SavedTensorSliceMeta -> f SavedTensorSliceMeta)
-> SavedTensorSlices
-> f SavedTensorSlices
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSlices -> Maybe SavedTensorSliceMeta)
-> (SavedTensorSlices
-> Maybe SavedTensorSliceMeta -> SavedTensorSlices)
-> Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedTensorSliceMeta)
(Maybe SavedTensorSliceMeta)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSlices -> Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta
(\ x__ :: SavedTensorSlices
x__ y__ :: Maybe SavedTensorSliceMeta
y__ -> SavedTensorSlices
x__ {_SavedTensorSlices'meta :: Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta = Maybe SavedTensorSliceMeta
y__}))
(SavedTensorSliceMeta
-> Lens' (Maybe SavedTensorSliceMeta) SavedTensorSliceMeta
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens SavedTensorSliceMeta
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedTensorSlices "maybe'meta" (Prelude.Maybe SavedTensorSliceMeta) where
fieldOf :: Proxy# "maybe'meta"
-> (Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> SavedTensorSlices
-> f SavedTensorSlices
fieldOf _
= ((Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> SavedTensorSlices -> f SavedTensorSlices)
-> ((Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> (Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> SavedTensorSlices
-> f SavedTensorSlices
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSlices -> Maybe SavedTensorSliceMeta)
-> (SavedTensorSlices
-> Maybe SavedTensorSliceMeta -> SavedTensorSlices)
-> Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedTensorSliceMeta)
(Maybe SavedTensorSliceMeta)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSlices -> Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta
(\ x__ :: SavedTensorSlices
x__ y__ :: Maybe SavedTensorSliceMeta
y__ -> SavedTensorSlices
x__ {_SavedTensorSlices'meta :: Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta = Maybe SavedTensorSliceMeta
y__}))
(Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta))
-> Maybe SavedTensorSliceMeta -> f (Maybe SavedTensorSliceMeta)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedTensorSlices "data'" SavedSlice where
fieldOf :: Proxy# "data'"
-> (SavedSlice -> f SavedSlice)
-> SavedTensorSlices
-> f SavedTensorSlices
fieldOf _
= ((Maybe SavedSlice -> f (Maybe SavedSlice))
-> SavedTensorSlices -> f SavedTensorSlices)
-> ((SavedSlice -> f SavedSlice)
-> Maybe SavedSlice -> f (Maybe SavedSlice))
-> (SavedSlice -> f SavedSlice)
-> SavedTensorSlices
-> f SavedTensorSlices
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSlices -> Maybe SavedSlice)
-> (SavedTensorSlices -> Maybe SavedSlice -> SavedTensorSlices)
-> Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedSlice)
(Maybe SavedSlice)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSlices -> Maybe SavedSlice
_SavedTensorSlices'data'
(\ x__ :: SavedTensorSlices
x__ y__ :: Maybe SavedSlice
y__ -> SavedTensorSlices
x__ {_SavedTensorSlices'data' :: Maybe SavedSlice
_SavedTensorSlices'data' = Maybe SavedSlice
y__}))
(SavedSlice -> Lens' (Maybe SavedSlice) SavedSlice
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens SavedSlice
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField SavedTensorSlices "maybe'data'" (Prelude.Maybe SavedSlice) where
fieldOf :: Proxy# "maybe'data'"
-> (Maybe SavedSlice -> f (Maybe SavedSlice))
-> SavedTensorSlices
-> f SavedTensorSlices
fieldOf _
= ((Maybe SavedSlice -> f (Maybe SavedSlice))
-> SavedTensorSlices -> f SavedTensorSlices)
-> ((Maybe SavedSlice -> f (Maybe SavedSlice))
-> Maybe SavedSlice -> f (Maybe SavedSlice))
-> (Maybe SavedSlice -> f (Maybe SavedSlice))
-> SavedTensorSlices
-> f SavedTensorSlices
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((SavedTensorSlices -> Maybe SavedSlice)
-> (SavedTensorSlices -> Maybe SavedSlice -> SavedTensorSlices)
-> Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedSlice)
(Maybe SavedSlice)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSlices -> Maybe SavedSlice
_SavedTensorSlices'data'
(\ x__ :: SavedTensorSlices
x__ y__ :: Maybe SavedSlice
y__ -> SavedTensorSlices
x__ {_SavedTensorSlices'data' :: Maybe SavedSlice
_SavedTensorSlices'data' = Maybe SavedSlice
y__}))
(Maybe SavedSlice -> f (Maybe SavedSlice))
-> Maybe SavedSlice -> f (Maybe SavedSlice)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SavedTensorSlices where
messageName :: Proxy SavedTensorSlices -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SavedTensorSlices"
packedMessageDescriptor :: Proxy SavedTensorSlices -> ByteString
packedMessageDescriptor _
= "\n\
\\DC1SavedTensorSlices\DC24\n\
\\EOTmeta\CAN\SOH \SOH(\v2 .tensorflow.SavedTensorSliceMetaR\EOTmeta\DC2*\n\
\\EOTdata\CAN\STX \SOH(\v2\SYN.tensorflow.SavedSliceR\EOTdata"
packedFileDescriptor :: Proxy SavedTensorSlices -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor SavedTensorSlices)
fieldsByTag
= let
meta__field_descriptor :: FieldDescriptor SavedTensorSlices
meta__field_descriptor
= String
-> FieldTypeDescriptor SavedTensorSliceMeta
-> FieldAccessor SavedTensorSlices SavedTensorSliceMeta
-> FieldDescriptor SavedTensorSlices
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"meta"
(MessageOrGroup -> FieldTypeDescriptor SavedTensorSliceMeta
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor SavedTensorSliceMeta)
(Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedTensorSliceMeta)
(Maybe SavedTensorSliceMeta)
-> FieldAccessor SavedTensorSlices SavedTensorSliceMeta
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'meta" 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 @"maybe'meta")) ::
Data.ProtoLens.FieldDescriptor SavedTensorSlices
data'__field_descriptor :: FieldDescriptor SavedTensorSlices
data'__field_descriptor
= String
-> FieldTypeDescriptor SavedSlice
-> FieldAccessor SavedTensorSlices SavedSlice
-> FieldDescriptor SavedTensorSlices
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(MessageOrGroup -> FieldTypeDescriptor SavedSlice
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor SavedSlice)
(Lens
SavedTensorSlices
SavedTensorSlices
(Maybe SavedSlice)
(Maybe SavedSlice)
-> FieldAccessor SavedTensorSlices SavedSlice
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'data'" 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 @"maybe'data'")) ::
Data.ProtoLens.FieldDescriptor SavedTensorSlices
in
[(Tag, FieldDescriptor SavedTensorSlices)]
-> Map Tag (FieldDescriptor SavedTensorSlices)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SavedTensorSlices
meta__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SavedTensorSlices
data'__field_descriptor)]
unknownFields :: LensLike' f SavedTensorSlices FieldSet
unknownFields
= (SavedTensorSlices -> FieldSet)
-> (SavedTensorSlices -> FieldSet -> SavedTensorSlices)
-> Lens' SavedTensorSlices FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
SavedTensorSlices -> FieldSet
_SavedTensorSlices'_unknownFields
(\ x__ :: SavedTensorSlices
x__ y__ :: FieldSet
y__ -> SavedTensorSlices
x__ {_SavedTensorSlices'_unknownFields :: FieldSet
_SavedTensorSlices'_unknownFields = FieldSet
y__})
defMessage :: SavedTensorSlices
defMessage
= $WSavedTensorSlices'_constructor :: Maybe SavedTensorSliceMeta
-> Maybe SavedSlice -> FieldSet -> SavedTensorSlices
SavedTensorSlices'_constructor
{_SavedTensorSlices'meta :: Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta = Maybe SavedTensorSliceMeta
forall a. Maybe a
Prelude.Nothing,
_SavedTensorSlices'data' :: Maybe SavedSlice
_SavedTensorSlices'data' = Maybe SavedSlice
forall a. Maybe a
Prelude.Nothing,
_SavedTensorSlices'_unknownFields :: FieldSet
_SavedTensorSlices'_unknownFields = []}
parseMessage :: Parser SavedTensorSlices
parseMessage
= let
loop ::
SavedTensorSlices
-> Data.ProtoLens.Encoding.Bytes.Parser SavedTensorSlices
loop :: SavedTensorSlices -> Parser SavedTensorSlices
loop x :: SavedTensorSlices
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]))))
SavedTensorSlices -> Parser SavedTensorSlices
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter SavedTensorSlices SavedTensorSlices FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedTensorSlices -> SavedTensorSlices
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 SavedTensorSlices SavedTensorSlices FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SavedTensorSlices
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do SavedTensorSliceMeta
y <- Parser SavedTensorSliceMeta
-> String -> Parser SavedTensorSliceMeta
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser SavedTensorSliceMeta -> Parser SavedTensorSliceMeta
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser SavedTensorSliceMeta
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"meta"
SavedTensorSlices -> Parser SavedTensorSlices
loop (Setter
SavedTensorSlices
SavedTensorSlices
SavedTensorSliceMeta
SavedTensorSliceMeta
-> SavedTensorSliceMeta -> SavedTensorSlices -> SavedTensorSlices
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "meta" 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 @"meta") SavedTensorSliceMeta
y SavedTensorSlices
x)
18
-> do SavedSlice
y <- Parser SavedSlice -> String -> Parser SavedSlice
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser SavedSlice -> Parser SavedSlice
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser SavedSlice
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"data"
SavedTensorSlices -> Parser SavedTensorSlices
loop (Setter SavedTensorSlices SavedTensorSlices SavedSlice SavedSlice
-> SavedSlice -> SavedTensorSlices -> SavedTensorSlices
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") SavedSlice
y SavedTensorSlices
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
SavedTensorSlices -> Parser SavedTensorSlices
loop
(Setter SavedTensorSlices SavedTensorSlices FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedTensorSlices -> SavedTensorSlices
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 SavedTensorSlices SavedTensorSlices FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SavedTensorSlices
x)
in
Parser SavedTensorSlices -> String -> Parser SavedTensorSlices
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do SavedTensorSlices -> Parser SavedTensorSlices
loop SavedTensorSlices
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SavedTensorSlices"
buildMessage :: SavedTensorSlices -> Builder
buildMessage
= \ _x :: SavedTensorSlices
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe SavedTensorSliceMeta)
SavedTensorSlices
SavedTensorSlices
(Maybe SavedTensorSliceMeta)
(Maybe SavedTensorSliceMeta)
-> SavedTensorSlices -> Maybe SavedTensorSliceMeta
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'meta" 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 @"maybe'meta") SavedTensorSlices
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: SavedTensorSliceMeta
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (SavedTensorSliceMeta -> ByteString)
-> SavedTensorSliceMeta
-> 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))
SavedTensorSliceMeta -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
SavedTensorSliceMeta
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe SavedSlice)
SavedTensorSlices
SavedTensorSlices
(Maybe SavedSlice)
(Maybe SavedSlice)
-> SavedTensorSlices -> Maybe SavedSlice
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'data'" 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 @"maybe'data'") SavedTensorSlices
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: SavedSlice
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (SavedSlice -> ByteString) -> SavedSlice -> 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))
SavedSlice -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
SavedSlice
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet SavedTensorSlices SavedTensorSlices FieldSet FieldSet
-> SavedTensorSlices -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet SavedTensorSlices SavedTensorSlices FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SavedTensorSlices
_x)))
instance Control.DeepSeq.NFData SavedTensorSlices where
rnf :: SavedTensorSlices -> ()
rnf
= \ x__ :: SavedTensorSlices
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedTensorSlices -> FieldSet
_SavedTensorSlices'_unknownFields SavedTensorSlices
x__)
(Maybe SavedTensorSliceMeta -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(SavedTensorSlices -> Maybe SavedTensorSliceMeta
_SavedTensorSlices'meta SavedTensorSlices
x__)
(Maybe SavedSlice -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SavedTensorSlices -> Maybe SavedSlice
_SavedTensorSlices'data' SavedTensorSlices
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= "\n\
\-tensorflow/core/util/saved_tensor_slice.proto\DC2\n\
\tensorflow\SUB,tensorflow/core/framework/tensor_shape.proto\SUB,tensorflow/core/framework/tensor_slice.proto\SUB&tensorflow/core/framework/tensor.proto\SUB%tensorflow/core/framework/types.proto\SUB(tensorflow/core/framework/versions.proto\"\182\SOH\n\
\\SOSavedSliceMeta\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC22\n\
\\ENQshape\CAN\STX \SOH(\v2\FS.tensorflow.TensorShapeProtoR\ENQshape\DC2(\n\
\\EOTtype\CAN\ETX \SOH(\SO2\DC4.tensorflow.DataTypeR\EOTtype\DC22\n\
\\ENQslice\CAN\EOT \ETX(\v2\FS.tensorflow.TensorSliceProtoR\ENQslice\"~\n\
\\DC4SavedTensorSliceMeta\DC22\n\
\\ACKtensor\CAN\SOH \ETX(\v2\SUB.tensorflow.SavedSliceMetaR\ACKtensor\DC22\n\
\\bversions\CAN\STX \SOH(\v2\SYN.tensorflow.VersionDefR\bversions\"\129\SOH\n\
\\n\
\SavedSlice\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC22\n\
\\ENQslice\CAN\STX \SOH(\v2\FS.tensorflow.TensorSliceProtoR\ENQslice\DC2+\n\
\\EOTdata\CAN\ETX \SOH(\v2\ETB.tensorflow.TensorProtoR\EOTdata\"u\n\
\\DC1SavedTensorSlices\DC24\n\
\\EOTmeta\CAN\SOH \SOH(\v2 .tensorflow.SavedTensorSliceMetaR\EOTmeta\DC2*\n\
\\EOTdata\CAN\STX \SOH(\v2\SYN.tensorflow.SavedSliceR\EOTdataB2\n\
\\DC3org.tensorflow.utilB\SYNSavedTensorSliceProtosP\SOH\248\SOH\SOHJ\226\ETB\n\
\\ACK\DC2\EOT\DC1\NULS\STX\n\
\\230\ACK\n\
\\SOH\f\DC2\ETX\DC1\NUL\DC22\130\SOH Protocol buffers for saved tensor slices. It's used for the brain tensor\n\
\ ops checkpoints and the V3 checkpoints in dist_belief.\n\
\2\214\ENQ A checkpoint file is an sstable. The value for each record is a serialized\n\
\ SavedTensorSlices message (defined below).\n\
\\n\
\ Each checkpoint file has a record with the empty key (\"\"), which corresponds\n\
\ to a SavedTensorSlices message that contains a \"meta\", that serves as a\n\
\ table of contents on all the tensor slices saved in this file. Since the key\n\
\ is \"\", it's always the first record in each file.\n\
\\n\
\ Each of the rest of the records in a checkpoint stores the raw data of a\n\
\ particular tensor slice, in SavedSlice format. The corresponding key is an\n\
\ ordered code that encodes the name of the tensor and the slice\n\
\ information. The name is also stored in the SaveSlice message for ease of\n\
\ debugging and manual examination.\n\
\\n\
\\b\n\
\\SOH\STX\DC2\ETX\DC3\NUL\DC3\n\
\\b\n\
\\SOH\b\DC2\ETX\DC4\NUL\US\n\
\\t\n\
\\STX\b\US\DC2\ETX\DC4\NUL\US\n\
\\b\n\
\\SOH\b\DC2\ETX\NAK\NUL7\n\
\\t\n\
\\STX\b\b\DC2\ETX\NAK\NUL7\n\
\\b\n\
\\SOH\b\DC2\ETX\SYN\NUL\"\n\
\\t\n\
\\STX\b\n\
\\DC2\ETX\SYN\NUL\"\n\
\\b\n\
\\SOH\b\DC2\ETX\ETB\NUL,\n\
\\t\n\
\\STX\b\SOH\DC2\ETX\ETB\NUL,\n\
\\t\n\
\\STX\ETX\NUL\DC2\ETX\EM\NUL6\n\
\\t\n\
\\STX\ETX\SOH\DC2\ETX\SUB\NUL6\n\
\\t\n\
\\STX\ETX\STX\DC2\ETX\ESC\NUL0\n\
\\t\n\
\\STX\ETX\ETX\DC2\ETX\FS\NUL/\n\
\\t\n\
\\STX\ETX\EOT\DC2\ETX\GS\NUL2\n\
\c\n\
\\STX\EOT\NUL\DC2\EOT!\NUL-\SOH\SUBW Metadata describing the set of slices of the same tensor saved in a\n\
\ checkpoint file.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX!\b\SYN\n\
\\"\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX#\STX\DC2\SUB\NAK Name of the tensor.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX#\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX#\t\r\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX#\DLE\DC1\n\
\\"\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX&\STX\GS\SUB\NAK Shape of the tensor\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX&\STX\DC2\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX&\DC3\CAN\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX&\ESC\FS\n\
\!\n\
\\EOT\EOT\NUL\STX\STX\DC2\ETX)\STX\DC4\SUB\DC4 Type of the tensor\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ACK\DC2\ETX)\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX)\v\SI\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX)\DC2\DC3\n\
\D\n\
\\EOT\EOT\NUL\STX\ETX\DC2\ETX,\STX&\SUB7 Explicit list of slices saved in the checkpoint file.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\EOT\DC2\ETX,\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ACK\DC2\ETX,\v\ESC\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX,\FS!\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX,$%\n\
\\150\SOH\n\
\\STX\EOT\SOH\DC2\EOT1\NUL8\SOH\SUB\137\SOH Metadata describing the set of tensor slices saved in a checkpoint file.\n\
\ It is always stored at the beginning of each checkpoint file.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\SOH\SOH\DC2\ETX1\b\FS\n\
\G\n\
\\EOT\EOT\SOH\STX\NUL\DC2\ETX3\STX%\SUB: Each SavedSliceMeta describes the slices for one tensor.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\EOT\DC2\ETX3\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX3\v\EM\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX3\SUB \n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX3#$\n\
\i\n\
\\EOT\EOT\SOH\STX\SOH\DC2\ETX7\STX\SUB\SUB\\ Compatibility version of this checkpoint. See core/public/version.h\n\
\ for version history.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ACK\DC2\ETX7\STX\f\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX7\r\NAK\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX7\CAN\EM\n\
\b\n\
\\STX\EOT\STX\DC2\EOT<\NULH\SOH\SUBV Saved tensor slice: it stores the name of the tensors, the slice, and the\n\
\ raw data.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\STX\SOH\DC2\ETX<\b\DC2\n\
\\137\SOH\n\
\\EOT\EOT\STX\STX\NUL\DC2\ETX?\STX\DC2\SUB| Name of the tensor that this slice belongs to. This must be identical to\n\
\ the name used to encode the key for this record.\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX?\STX\b\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX?\t\r\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX?\DLE\DC1\n\
\}\n\
\\EOT\EOT\STX\STX\SOH\DC2\ETXC\STX\GS\SUBp Extent of the slice. Must have one entry for each of the dimension of the\n\
\ tensor that this slice belongs to.\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\ACK\DC2\ETXC\STX\DC2\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETXC\DC3\CAN\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETXC\ESC\FS\n\
\\152\SOH\n\
\\EOT\EOT\STX\STX\STX\DC2\ETXG\STX\ETB\SUB\138\SOH The raw data of the slice is stored as a TensorProto. Only raw data are\n\
\ stored (we don't fill in fields such as dtype or tensor_shape).\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\STX\ACK\DC2\ETXG\STX\r\n\
\\f\n\
\\ENQ\EOT\STX\STX\STX\SOH\DC2\ETXG\SO\DC2\n\
\\f\n\
\\ENQ\EOT\STX\STX\STX\ETX\DC2\ETXG\NAK\SYN\n\
\]\n\
\\STX\EOT\ETX\DC2\EOTL\NULS\SOH\SUBQ Each record in a v3 checkpoint file is a serialized SavedTensorSlices\n\
\ message.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\ETX\SOH\DC2\ETXL\b\EM\n\
\\164\SOH\n\
\\EOT\EOT\ETX\STX\NUL\DC2\ETXO\STX \SUB\150\SOH This is only present at the first item of each checkpoint file and serves\n\
\ as a table of contents, listing all the tensor slices saved in this file.\n\
\\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETXO\STX\SYN\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETXO\ETB\ESC\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETXO\RS\US\n\
\M\n\
\\EOT\EOT\ETX\STX\SOH\DC2\ETXR\STX\SYN\SUB@ This exists in all but the first item of each checkpoint file.\n\
\\n\
\\f\n\
\\ENQ\EOT\ETX\STX\SOH\ACK\DC2\ETXR\STX\f\n\
\\f\n\
\\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETXR\r\DC1\n\
\\f\n\
\\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETXR\DC4\NAKb\ACKproto3"