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

Function newCRunArgs

tensorflow/go/session.go:362–379  ·  view source on GitHub ↗
(feeds map[Output]*Tensor, fetches []Output, targets []*Operation)

Source from the content-addressed store, hash-verified

360}
361
362func newCRunArgs(feeds map[Output]*Tensor, fetches []Output, targets []*Operation) *cRunArgs {
363 c := &cRunArgs{
364 fetches: make([]C.TF_Output, len(fetches)),
365 fetchTensors: make([]*C.TF_Tensor, len(fetches)),
366 targets: make([]*C.TF_Operation, len(targets)),
367 }
368 for o, t := range feeds {
369 c.feeds = append(c.feeds, o.c())
370 c.feedTensors = append(c.feedTensors, t.c)
371 }
372 for i, o := range fetches {
373 c.fetches[i] = o.c()
374 }
375 for i, t := range targets {
376 c.targets[i] = t.c
377 }
378 return c
379}
380
381func (c *cRunArgs) toGo() []*Tensor {
382 ret := make([]*Tensor, len(c.fetchTensors))

Callers 2

RunMethod · 0.85
RunMethod · 0.85

Calls 3

makeFunction · 0.85
appendFunction · 0.85
cMethod · 0.45

Tested by

no test coverage detected