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

Method Cast

tensor.go:104–108  ·  view source on GitHub ↗

Cast casts the current tensor to the requested dtype

(dtype tf.DataType)

Source from the content-addressed store, hash-verified

102
103// Cast casts the current tensor to the requested dtype
104func (tensor *Tensor) Cast(dtype tf.DataType) *Tensor {
105 defer tensor.Check()
106 tensor.Output = Cast(tensor.Path, tensor.Output, dtype)
107 return tensor
108}
109
110// Add defines the add operation between the tensor and tfout
111// `tfout` dtype is converted to tensor.Dtype() before adding

Callers 4

TestTensorPanicFunction · 0.95
CastFunction · 0.45
TestMinValueFunction · 0.45
TestMaxValueFunction · 0.45

Calls 2

CheckMethod · 0.95
CastFunction · 0.85

Tested by 3

TestTensorPanicFunction · 0.76
TestMinValueFunction · 0.36
TestMaxValueFunction · 0.36