{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,
FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
module Proto.Tensorflow.Core.Framework.TensorDescription 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
import qualified
Proto.Tensorflow.Core.Framework.AllocationDescription
import qualified Proto.Tensorflow.Core.Framework.TensorShape
import qualified Proto.Tensorflow.Core.Framework.Types
data TensorDescription = TensorDescription{_TensorDescription'dtype
:: !Proto.Tensorflow.Core.Framework.Types.DataType,
_TensorDescription'shape ::
!(Prelude.Maybe
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto),
_TensorDescription'allocationDescription ::
!(Prelude.Maybe
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription)}
deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)
instance (a ~ Proto.Tensorflow.Core.Framework.Types.DataType,
b ~ Proto.Tensorflow.Core.Framework.Types.DataType,
Prelude.Functor f) =>
Lens.Labels.HasLens "dtype" f TensorDescription TensorDescription a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorDescription'dtype
(\ x__ y__ -> x__{_TensorDescription'dtype = y__}))
Prelude.id
instance (a ~
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto,
b ~ Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto,
Prelude.Functor f) =>
Lens.Labels.HasLens "shape" f TensorDescription TensorDescription a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorDescription'shape
(\ x__ y__ -> x__{_TensorDescription'shape = y__}))
(Data.ProtoLens.maybeLens Data.Default.Class.def)
instance (a ~
Prelude.Maybe
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto,
b ~
Prelude.Maybe
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto,
Prelude.Functor f) =>
Lens.Labels.HasLens "maybe'shape" f TensorDescription
TensorDescription
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorDescription'shape
(\ x__ y__ -> x__{_TensorDescription'shape = y__}))
Prelude.id
instance (a ~
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription,
b ~
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription,
Prelude.Functor f) =>
Lens.Labels.HasLens "allocationDescription" f TensorDescription
TensorDescription
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens
_TensorDescription'allocationDescription
(\ x__ y__ -> x__{_TensorDescription'allocationDescription = y__}))
(Data.ProtoLens.maybeLens Data.Default.Class.def)
instance (a ~
Prelude.Maybe
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription,
b ~
Prelude.Maybe
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription,
Prelude.Functor f) =>
Lens.Labels.HasLens "maybe'allocationDescription" f
TensorDescription
TensorDescription
a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens
_TensorDescription'allocationDescription
(\ x__ y__ -> x__{_TensorDescription'allocationDescription = y__}))
Prelude.id
instance Data.Default.Class.Default TensorDescription where
def
= TensorDescription{_TensorDescription'dtype =
Data.Default.Class.def,
_TensorDescription'shape = Prelude.Nothing,
_TensorDescription'allocationDescription = Prelude.Nothing}
instance Data.ProtoLens.Message TensorDescription where
descriptor
= let dtype__field_descriptor
= Data.ProtoLens.FieldDescriptor "dtype"
(Data.ProtoLens.EnumField ::
Data.ProtoLens.FieldTypeDescriptor
Proto.Tensorflow.Core.Framework.Types.DataType)
(Data.ProtoLens.PlainField Data.ProtoLens.Optional dtype)
:: Data.ProtoLens.FieldDescriptor TensorDescription
shape__field_descriptor
= Data.ProtoLens.FieldDescriptor "shape"
(Data.ProtoLens.MessageField ::
Data.ProtoLens.FieldTypeDescriptor
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)
(Data.ProtoLens.OptionalField maybe'shape)
:: Data.ProtoLens.FieldDescriptor TensorDescription
allocationDescription__field_descriptor
= Data.ProtoLens.FieldDescriptor "allocation_description"
(Data.ProtoLens.MessageField ::
Data.ProtoLens.FieldTypeDescriptor
Proto.Tensorflow.Core.Framework.AllocationDescription.AllocationDescription)
(Data.ProtoLens.OptionalField maybe'allocationDescription)
:: Data.ProtoLens.FieldDescriptor TensorDescription
in
Data.ProtoLens.MessageDescriptor
(Data.Text.pack "tensorflow.TensorDescription")
(Data.Map.fromList
[(Data.ProtoLens.Tag 1, dtype__field_descriptor),
(Data.ProtoLens.Tag 2, shape__field_descriptor),
(Data.ProtoLens.Tag 4, allocationDescription__field_descriptor)])
(Data.Map.fromList
[("dtype", dtype__field_descriptor),
("shape", shape__field_descriptor),
("allocation_description",
allocationDescription__field_descriptor)])
allocationDescription ::
forall f s t a b .
(Lens.Labels.HasLens "allocationDescription" f s t a b) =>
Lens.Family2.LensLike f s t a b
allocationDescription
= Lens.Labels.lensOf
((Lens.Labels.proxy#) ::
(Lens.Labels.Proxy#) "allocationDescription")
dtype ::
forall f s t a b . (Lens.Labels.HasLens "dtype" f s t a b) =>
Lens.Family2.LensLike f s t a b
dtype
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dtype")
maybe'allocationDescription ::
forall f s t a b .
(Lens.Labels.HasLens "maybe'allocationDescription" f s t a b) =>
Lens.Family2.LensLike f s t a b
maybe'allocationDescription
= Lens.Labels.lensOf
((Lens.Labels.proxy#) ::
(Lens.Labels.Proxy#) "maybe'allocationDescription")
maybe'shape ::
forall f s t a b . (Lens.Labels.HasLens "maybe'shape" f s t a b) =>
Lens.Family2.LensLike f s t a b
maybe'shape
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'shape")
shape ::
forall f s t a b . (Lens.Labels.HasLens "shape" f s t a b) =>
Lens.Family2.LensLike f s t a b
shape
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "shape")