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

Function Restore

tensorflow/go/op/wrappers.go:32538–32555  ·  view source on GitHub ↗

Restores a tensor from checkpoint files. Reads a tensor stored in one or several files. If there are several files (for instance because a tensor was saved as slices), `file_pattern` may contain wildcard symbols (`*` and `?`) in the filename portion only, not in the directory portion. If a `file_p

(scope *Scope, file_pattern tf.Output, tensor_name tf.Output, dt tf.DataType, optional ...RestoreAttr)

Source from the content-addressed store, hash-verified

32536//
32537// Returns The restored tensor.
32538func Restore(scope *Scope, file_pattern tf.Output, tensor_name tf.Output, dt tf.DataType, optional ...RestoreAttr) (tensor tf.Output) {
32539 if scope.Err() != nil {
32540 return
32541 }
32542 attrs := map[string]interface{}{"dt": dt}
32543 for _, a := range optional {
32544 a(attrs)
32545 }
32546 opspec := tf.OpSpec{
32547 Type: "Restore",
32548 Input: []tf.Input{
32549 file_pattern, tensor_name,
32550 },
32551 Attrs: attrs,
32552 }
32553 op := scope.AddOperation(opspec)
32554 return op.Output(0)
32555}
32556
32557// Compute the pairwise cross product.
32558//

Callers 2

TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
TEST_FFunction · 0.68