DeepLearning,Tensor,Diagonal
construct diagonal tensor
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Diagonal(x,opts)
x
-
Tensor
opts
zero of more options as specified below.
name=string
The value of option name specifies an optional name for this Tensor, to be displayed in output and when visualizing the dataflow graph.
The Diagonal(x,opts) command returns a diagonal Tensor with a given diagonal values.
Given a diagonal x, this operation returns a Tensor with the diagonal and everything else padded with zeros.
with⁡DeepLearning:
V≔−35.0,65.0,41.0
V≔−35.065.041.0
t≔Constant⁡V
t≔DeepLearning TensorShape: [3]Data Type: float[8]
Diagonal⁡t
DeepLearning TensorShape: [3, 3]Data Type: float[8]
The DeepLearning,Tensor,Diagonal command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
DeepLearning Overview
LinearAlgebra
Download Help Document