MCPcopy
hub / github.com/galeone/tfgo / Square

Method Square

tensor.go:149–152  ·  view source on GitHub ↗

Square defines the square operation for the tensor values

()

Source from the content-addressed store, hash-verified

147
148// Square defines the square operation for the tensor values
149func (tensor *Tensor) Square() *Tensor {
150 defer tensor.Check()
151 return tensor.Pow(op.Const(tensor.Path.SubScope("y"), 2.))
152}
153
154// Sqrt defines the square root operation for the tensor values
155func (tensor *Tensor) Sqrt() *Tensor {

Callers 1

TestTensorFunction · 0.45

Calls 2

CheckMethod · 0.95
PowMethod · 0.95

Tested by 1

TestTensorFunction · 0.36