MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TestNewTensorHandle

Function TestNewTensorHandle

tensorflow/go/tensor_handle_test.go:25–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestNewTensorHandle(t *testing.T) {
26 vals := [][]float32{{1.0, 2.0}, {3.0, 4.0}}
27 tensor, err := NewTensor(vals)
28 if err != nil {
29 t.Fatal(err)
30 }
31 if _, err = NewTensorHandle(tensor); err != nil {
32 t.Fatal(err)
33 }
34}
35
36func TestTensorHandleDataType(t *testing.T) {
37 vals := [][]float32{{1.0, 2.0}, {3.0, 4.0}}

Callers

nothing calls this directly

Calls 2

NewTensorFunction · 0.85
NewTensorHandleFunction · 0.85

Tested by

no test coverage detected