{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,
FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
module Proto.Tensorflow.Core.Framework.Tensor 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.ResourceHandle
import qualified Proto.Tensorflow.Core.Framework.TensorShape
import qualified Proto.Tensorflow.Core.Framework.Types
data TensorProto = TensorProto{_TensorProto'dtype ::
!Proto.Tensorflow.Core.Framework.Types.DataType,
_TensorProto'tensorShape ::
!(Prelude.Maybe
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto),
_TensorProto'versionNumber :: !Data.Int.Int32,
_TensorProto'tensorContent :: !Data.ByteString.ByteString,
_TensorProto'halfVal :: ![Data.Int.Int32],
_TensorProto'floatVal :: ![Prelude.Float],
_TensorProto'doubleVal :: ![Prelude.Double],
_TensorProto'intVal :: ![Data.Int.Int32],
_TensorProto'stringVal :: ![Data.ByteString.ByteString],
_TensorProto'scomplexVal :: ![Prelude.Float],
_TensorProto'int64Val :: ![Data.Int.Int64],
_TensorProto'boolVal :: ![Prelude.Bool],
_TensorProto'dcomplexVal :: ![Prelude.Double],
_TensorProto'resourceHandleVal ::
![Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandleProto]}
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 TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'dtype
(\ x__ y__ -> x__{_TensorProto'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 "tensorShape" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'tensorShape
(\ x__ y__ -> x__{_TensorProto'tensorShape = 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'tensorShape" f TensorProto TensorProto a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'tensorShape
(\ x__ y__ -> x__{_TensorProto'tensorShape = y__}))
Prelude.id
instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,
Prelude.Functor f) =>
Lens.Labels.HasLens "versionNumber" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'versionNumber
(\ x__ y__ -> x__{_TensorProto'versionNumber = y__}))
Prelude.id
instance (a ~ Data.ByteString.ByteString,
b ~ Data.ByteString.ByteString, Prelude.Functor f) =>
Lens.Labels.HasLens "tensorContent" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'tensorContent
(\ x__ y__ -> x__{_TensorProto'tensorContent = y__}))
Prelude.id
instance (a ~ [Data.Int.Int32], b ~ [Data.Int.Int32],
Prelude.Functor f) =>
Lens.Labels.HasLens "halfVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'halfVal
(\ x__ y__ -> x__{_TensorProto'halfVal = y__}))
Prelude.id
instance (a ~ [Prelude.Float], b ~ [Prelude.Float],
Prelude.Functor f) =>
Lens.Labels.HasLens "floatVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'floatVal
(\ x__ y__ -> x__{_TensorProto'floatVal = y__}))
Prelude.id
instance (a ~ [Prelude.Double], b ~ [Prelude.Double],
Prelude.Functor f) =>
Lens.Labels.HasLens "doubleVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'doubleVal
(\ x__ y__ -> x__{_TensorProto'doubleVal = y__}))
Prelude.id
instance (a ~ [Data.Int.Int32], b ~ [Data.Int.Int32],
Prelude.Functor f) =>
Lens.Labels.HasLens "intVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'intVal
(\ x__ y__ -> x__{_TensorProto'intVal = y__}))
Prelude.id
instance (a ~ [Data.ByteString.ByteString],
b ~ [Data.ByteString.ByteString], Prelude.Functor f) =>
Lens.Labels.HasLens "stringVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'stringVal
(\ x__ y__ -> x__{_TensorProto'stringVal = y__}))
Prelude.id
instance (a ~ [Prelude.Float], b ~ [Prelude.Float],
Prelude.Functor f) =>
Lens.Labels.HasLens "scomplexVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'scomplexVal
(\ x__ y__ -> x__{_TensorProto'scomplexVal = y__}))
Prelude.id
instance (a ~ [Data.Int.Int64], b ~ [Data.Int.Int64],
Prelude.Functor f) =>
Lens.Labels.HasLens "int64Val" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'int64Val
(\ x__ y__ -> x__{_TensorProto'int64Val = y__}))
Prelude.id
instance (a ~ [Prelude.Bool], b ~ [Prelude.Bool],
Prelude.Functor f) =>
Lens.Labels.HasLens "boolVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'boolVal
(\ x__ y__ -> x__{_TensorProto'boolVal = y__}))
Prelude.id
instance (a ~ [Prelude.Double], b ~ [Prelude.Double],
Prelude.Functor f) =>
Lens.Labels.HasLens "dcomplexVal" f TensorProto TensorProto a b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'dcomplexVal
(\ x__ y__ -> x__{_TensorProto'dcomplexVal = y__}))
Prelude.id
instance (a ~
[Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandleProto],
b ~
[Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandleProto],
Prelude.Functor f) =>
Lens.Labels.HasLens "resourceHandleVal" f TensorProto TensorProto a
b
where
lensOf _
= (Prelude..)
(Lens.Family2.Unchecked.lens _TensorProto'resourceHandleVal
(\ x__ y__ -> x__{_TensorProto'resourceHandleVal = y__}))
Prelude.id
instance Data.Default.Class.Default TensorProto where
def
= TensorProto{_TensorProto'dtype = Data.Default.Class.def,
_TensorProto'tensorShape = Prelude.Nothing,
_TensorProto'versionNumber = Data.ProtoLens.fieldDefault,
_TensorProto'tensorContent = Data.ProtoLens.fieldDefault,
_TensorProto'halfVal = [], _TensorProto'floatVal = [],
_TensorProto'doubleVal = [], _TensorProto'intVal = [],
_TensorProto'stringVal = [], _TensorProto'scomplexVal = [],
_TensorProto'int64Val = [], _TensorProto'boolVal = [],
_TensorProto'dcomplexVal = [], _TensorProto'resourceHandleVal = []}
instance Data.ProtoLens.Message TensorProto 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 TensorProto
tensorShape__field_descriptor
= Data.ProtoLens.FieldDescriptor "tensor_shape"
(Data.ProtoLens.MessageField ::
Data.ProtoLens.FieldTypeDescriptor
Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)
(Data.ProtoLens.OptionalField maybe'tensorShape)
:: Data.ProtoLens.FieldDescriptor TensorProto
versionNumber__field_descriptor
= Data.ProtoLens.FieldDescriptor "version_number"
(Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(Data.ProtoLens.PlainField Data.ProtoLens.Optional versionNumber)
:: Data.ProtoLens.FieldDescriptor TensorProto
tensorContent__field_descriptor
= Data.ProtoLens.FieldDescriptor "tensor_content"
(Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(Data.ProtoLens.PlainField Data.ProtoLens.Optional tensorContent)
:: Data.ProtoLens.FieldDescriptor TensorProto
halfVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "half_val"
(Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed halfVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
floatVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "float_val"
(Data.ProtoLens.FloatField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed floatVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
doubleVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "double_val"
(Data.ProtoLens.DoubleField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed doubleVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
intVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "int_val"
(Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed intVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
stringVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "string_val"
(Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked stringVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
scomplexVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "scomplex_val"
(Data.ProtoLens.FloatField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed scomplexVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
int64Val__field_descriptor
= Data.ProtoLens.FieldDescriptor "int64_val"
(Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed int64Val)
:: Data.ProtoLens.FieldDescriptor TensorProto
boolVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "bool_val"
(Data.ProtoLens.BoolField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed boolVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
dcomplexVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "dcomplex_val"
(Data.ProtoLens.DoubleField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Packed dcomplexVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
resourceHandleVal__field_descriptor
= Data.ProtoLens.FieldDescriptor "resource_handle_val"
(Data.ProtoLens.MessageField ::
Data.ProtoLens.FieldTypeDescriptor
Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandleProto)
(Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked
resourceHandleVal)
:: Data.ProtoLens.FieldDescriptor TensorProto
in
Data.ProtoLens.MessageDescriptor
(Data.Text.pack "tensorflow.TensorProto")
(Data.Map.fromList
[(Data.ProtoLens.Tag 1, dtype__field_descriptor),
(Data.ProtoLens.Tag 2, tensorShape__field_descriptor),
(Data.ProtoLens.Tag 3, versionNumber__field_descriptor),
(Data.ProtoLens.Tag 4, tensorContent__field_descriptor),
(Data.ProtoLens.Tag 13, halfVal__field_descriptor),
(Data.ProtoLens.Tag 5, floatVal__field_descriptor),
(Data.ProtoLens.Tag 6, doubleVal__field_descriptor),
(Data.ProtoLens.Tag 7, intVal__field_descriptor),
(Data.ProtoLens.Tag 8, stringVal__field_descriptor),
(Data.ProtoLens.Tag 9, scomplexVal__field_descriptor),
(Data.ProtoLens.Tag 10, int64Val__field_descriptor),
(Data.ProtoLens.Tag 11, boolVal__field_descriptor),
(Data.ProtoLens.Tag 12, dcomplexVal__field_descriptor),
(Data.ProtoLens.Tag 14, resourceHandleVal__field_descriptor)])
(Data.Map.fromList
[("dtype", dtype__field_descriptor),
("tensor_shape", tensorShape__field_descriptor),
("version_number", versionNumber__field_descriptor),
("tensor_content", tensorContent__field_descriptor),
("half_val", halfVal__field_descriptor),
("float_val", floatVal__field_descriptor),
("double_val", doubleVal__field_descriptor),
("int_val", intVal__field_descriptor),
("string_val", stringVal__field_descriptor),
("scomplex_val", scomplexVal__field_descriptor),
("int64_val", int64Val__field_descriptor),
("bool_val", boolVal__field_descriptor),
("dcomplex_val", dcomplexVal__field_descriptor),
("resource_handle_val", resourceHandleVal__field_descriptor)])
boolVal ::
forall f s t a b . (Lens.Labels.HasLens "boolVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
boolVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "boolVal")
dcomplexVal ::
forall f s t a b . (Lens.Labels.HasLens "dcomplexVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
dcomplexVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dcomplexVal")
doubleVal ::
forall f s t a b . (Lens.Labels.HasLens "doubleVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
doubleVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "doubleVal")
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")
floatVal ::
forall f s t a b . (Lens.Labels.HasLens "floatVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
floatVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "floatVal")
halfVal ::
forall f s t a b . (Lens.Labels.HasLens "halfVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
halfVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "halfVal")
int64Val ::
forall f s t a b . (Lens.Labels.HasLens "int64Val" f s t a b) =>
Lens.Family2.LensLike f s t a b
int64Val
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "int64Val")
intVal ::
forall f s t a b . (Lens.Labels.HasLens "intVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
intVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "intVal")
maybe'tensorShape ::
forall f s t a b .
(Lens.Labels.HasLens "maybe'tensorShape" f s t a b) =>
Lens.Family2.LensLike f s t a b
maybe'tensorShape
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'tensorShape")
resourceHandleVal ::
forall f s t a b .
(Lens.Labels.HasLens "resourceHandleVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
resourceHandleVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "resourceHandleVal")
scomplexVal ::
forall f s t a b . (Lens.Labels.HasLens "scomplexVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
scomplexVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "scomplexVal")
stringVal ::
forall f s t a b . (Lens.Labels.HasLens "stringVal" f s t a b) =>
Lens.Family2.LensLike f s t a b
stringVal
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "stringVal")
tensorContent ::
forall f s t a b .
(Lens.Labels.HasLens "tensorContent" f s t a b) =>
Lens.Family2.LensLike f s t a b
tensorContent
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "tensorContent")
tensorShape ::
forall f s t a b . (Lens.Labels.HasLens "tensorShape" f s t a b) =>
Lens.Family2.LensLike f s t a b
tensorShape
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "tensorShape")
versionNumber ::
forall f s t a b .
(Lens.Labels.HasLens "versionNumber" f s t a b) =>
Lens.Family2.LensLike f s t a b
versionNumber
= Lens.Labels.lensOf
((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "versionNumber")