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

Method Clone

tensor.go:97–101  ·  view source on GitHub ↗

-------- Methods returning *Tensor Structs that embed *Tensor should ""override"" them Returning their own type -------- Clone returns a copy of the current tensor in a new scope Clone is used to create a different tensor from the output of an operation. The new node is placed at the same level of t

()

Source from the content-addressed store, hash-verified

95// The new node is placed at the same level of the current tensor
96// it can be seen as a twin tensor
97func (tensor *Tensor) Clone() *Tensor {
98 defer tensor.Check()
99 scope := NewScope(tensor.Root)
100 return NewTensor(scope, tensor.Output)
101}
102
103// Cast casts the current tensor to the requested dtype
104func (tensor *Tensor) Cast(dtype tf.DataType) *Tensor {

Callers 1

TestTensorFunction · 0.95

Calls 3

CheckMethod · 0.95
NewScopeFunction · 0.85
NewTensorFunction · 0.85

Tested by 1

TestTensorFunction · 0.76