Finalize returns the Graph on which this scope operates on and renders s unusable. If there was an error during graph construction, that error is returned instead.
()
| 60 | // unusable. If there was an error during graph construction, that error is |
| 61 | // returned instead. |
| 62 | func (s *Scope) Finalize() (*tf.Graph, error) { |
| 63 | if err := s.Err(); err != nil { |
| 64 | return nil, err |
| 65 | } |
| 66 | s.err.err = fmt.Errorf("Scope has been finalized and is no longer usable") |
| 67 | return s.graph, nil |
| 68 | } |
| 69 | |
| 70 | // AddOperation adds the operation to the Graph managed by s. |
| 71 | // |