Cast casts the current tensor to the requested dtype
(dtype tf.DataType)
| 102 | |
| 103 | // Cast casts the current tensor to the requested dtype |
| 104 | func (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 |