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

Function makeCShape

tensorflow/go/attrs.go:28–34  ·  view source on GitHub ↗

makeCShape converts a shape specified in C.int64_t into a Shape.

(shape []C.int64_t)

Source from the content-addressed store, hash-verified

26
27// makeCShape converts a shape specified in C.int64_t into a Shape.
28func makeCShape(shape []C.int64_t) Shape {
29 s := Shape{dims: make([]int64, len(shape))}
30 for i, n := range shape {
31 s.dims[i] = int64(n)
32 }
33 return s
34}
35
36// Attr returns the value of an attribute on op. It returns an error if the
37// attribute does not exist.

Callers 2

listAttributeFunction · 0.85
scalarAttributeFunction · 0.85

Calls 2

makeFunction · 0.85
int64Function · 0.85

Tested by

no test coverage detected