MCPcopy Index your code
hub / github.com/galeone/tfgo / Add

Method Add

tensor.go:112–117  ·  view source on GitHub ↗

Add defines the add operation between the tensor and tfout `tfout` dtype is converted to tensor.Dtype() before adding

(tfout tf.Output)

Source from the content-addressed store, hash-verified

110// Add defines the add operation between the tensor and tfout
111// `tfout` dtype is converted to tensor.Dtype() before adding
112func (tensor *Tensor) Add(tfout tf.Output) *Tensor {
113 defer tensor.Check()
114 s := tensor.Path.SubScope("Add")
115 tensor.Output = op.Add(s, tensor.Output, Cast(s, tfout, tensor.Dtype()))
116 return tensor
117}
118
119// Mul defines the multiplication operation between the tensor
120// and `tfout`. It's the multiplication element-wise with broadcasting support.

Callers 2

TestTensorPanicFunction · 0.95
TestTensorFunction · 0.45

Calls 3

CheckMethod · 0.95
DtypeMethod · 0.95
CastFunction · 0.85

Tested by 2

TestTensorPanicFunction · 0.76
TestTensorFunction · 0.36