{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,
FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
module Proto.Tensorflow.Core.Framework.TensorSlice where
import qualified Data.ProtoLens.Reexport.Prelude as Prelude
import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int
import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word
import qualified Data.ProtoLens.Reexport.Data.ProtoLens
as Data.ProtoLens
import qualified
Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum
as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Reexport.Lens.Family2
as Lens.Family2
import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked
as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Reexport.Data.Default.Class
as Data.Default.Class
import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text
import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map
import qualified Data.ProtoLens.Reexport.Data.ByteString
as Data.ByteString
import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels
data TensorSliceProto = TensorSliceProto{_TensorSliceProto'extent
:: ![TensorSliceProto'Extent]}
deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)
instance (a ~ [TensorSliceProto'Extent],
b ~ [TensorSliceProto'Extent], Prelude.Functor f) =>
Lens.Labels.HasLens "extent" f TensorSliceProto TensorSliceProto a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorSliceProto'extent
(\ x__ y__ -> x__{_TensorSliceProto'extent = y__}))
Prelude.id
instance Data.Default.Class.Default TensorSliceProto where
def = TensorSliceProto{_TensorSliceProto'extent = []}
instance Data.ProtoLens.Message TensorSliceProto where
descriptor
= let extent__field_descriptor
= Data.ProtoLens.FieldDescriptor "extent"
(Data.ProtoLens.MessageField ::
Data.ProtoLens.FieldTypeDescriptor TensorSliceProto'Extent)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked extent)
:: Data.ProtoLens.FieldDescriptor TensorSliceProto
in
Data.ProtoLens.MessageDescriptor
(Data.Text.pack "tensorflow.TensorSliceProto")
(Data.Map.fromList
[(Data.ProtoLens.Tag 1, extent__field_descriptor)])
(Data.Map.fromList [("extent", extent__field_descriptor)])
data TensorSliceProto'Extent = TensorSliceProto'Extent{_TensorSliceProto'Extent'start
:: !Data.Int.Int64,
_TensorSliceProto'Extent'hasLength ::
!(Prelude.Maybe
TensorSliceProto'Extent'HasLength)}
deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)
data TensorSliceProto'Extent'HasLength = TensorSliceProto'Extent'Length !Data.Int.Int64
deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)
instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,
Prelude.Functor f) =>
Lens.Labels.HasLens "start" f TensorSliceProto'Extent
TensorSliceProto'Extent
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorSliceProto'Extent'start
(\ x__ y__ -> x__{_TensorSliceProto'Extent'start = y__}))
Prelude.id
instance (a ~ Prelude.Maybe TensorSliceProto'Extent'HasLength,
b ~ Prelude.Maybe TensorSliceProto'Extent'HasLength,
Prelude.Functor f) =>
Lens.Labels.HasLens "maybe'hasLength" f TensorSliceProto'Extent
TensorSliceProto'Extent
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorSliceProto'Extent'hasLength
(\ x__ y__ -> x__{_TensorSliceProto'Extent'hasLength = y__}))
Prelude.id
instance (a ~ Prelude.Maybe Data.Int.Int64,
b ~ Prelude.Maybe Data.Int.Int64, Prelude.Functor f) =>
Lens.Labels.HasLens "maybe'length" f TensorSliceProto'Extent
TensorSliceProto'Extent
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorSliceProto'Extent'hasLength
(\ x__ y__ -> x__{_TensorSliceProto'Extent'hasLength = y__}))
(Lens.Family2.Unchecked.lens
(\ x__ ->
case x__ of
Prelude.Just
(TensorSliceProto'Extent'Length x__val) -> Prelude.Just x__val
_otherwise -> Prelude.Nothing)
(\ _ y__ -> Prelude.fmap TensorSliceProto'Extent'Length y__))
instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,
Prelude.Functor f) =>
Lens.Labels.HasLens "length" f TensorSliceProto'Extent
TensorSliceProto'Extent
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorSliceProto'Extent'hasLength
(\ x__ y__ -> x__{_TensorSliceProto'Extent'hasLength = y__}))
((Prelude..)
(Lens.Family2.Unchecked.lens
(\ x__ ->
case x__ of
Prelude.Just
(TensorSliceProto'Extent'Length x__val) -> Prelude.Just x__val
_otherwise -> Prelude.Nothing)
(\ _ y__ -> Prelude.fmap TensorSliceProto'Extent'Length y__))
(Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
instance Data.Default.Class.Default TensorSliceProto'Extent where
def
= TensorSliceProto'Extent{_TensorSliceProto'Extent'start =
Data.ProtoLens.fieldDefault,
_TensorSliceProto'Extent'hasLength = Prelude.Nothing}
instance Data.ProtoLens.Message TensorSliceProto'Extent where
descriptor
= let start__field_descriptor
= Data.ProtoLens.FieldDescriptor "start"
(Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(Data.ProtoLens.PlainField Data.ProtoLens.Optional start)
:: Data.ProtoLens.FieldDescriptor TensorSliceProto'Extent
length__field_descriptor
= Data.ProtoLens.FieldDescriptor "length"
(Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(Data.ProtoLens.OptionalField maybe'length)
:: Data.ProtoLens.FieldDescriptor TensorSliceProto'Extent
in
Data.ProtoLens.MessageDescriptor
(Data.Text.pack "tensorflow.TensorSliceProto.Extent")
(Data.Map.fromList
[(Data.ProtoLens.Tag 1, start__field_descriptor),
(Data.ProtoLens.Tag 2, length__field_descriptor)])
(Data.Map.fromList
[("start", start__field_descriptor),
("length", length__field_descriptor)])
extent ::
forall f s t a b . (Lens.Labels.HasLens "extent" f s t a b) =>
Lens.Family2.LensLike f s t a b
extent
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extent")
length ::
forall f s t a b . (Lens.Labels.HasLens "length" f s t a b) =>
Lens.Family2.LensLike f s t a b
length
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "length")
maybe'hasLength ::
forall f s t a b .
(Lens.Labels.HasLens "maybe'hasLength" f s t a b) =>
Lens.Family2.LensLike f s t a b
maybe'hasLength
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'hasLength")
maybe'length ::
forall f s t a b .
(Lens.Labels.HasLens "maybe'length" f s t a b) =>
Lens.Family2.LensLike f s t a b
maybe'length
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'length")
start ::
forall f s t a b . (Lens.Labels.HasLens "start" f s t a b) =>
Lens.Family2.LensLike f s t a b
start
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "start")