Operation returns the Operation named name in the Graph, or nil if no such operation is present.
(name string)
| 151 | // Operation returns the Operation named name in the Graph, or nil if no such |
| 152 | // operation is present. |
| 153 | func (g *Graph) Operation(name string) *Operation { |
| 154 | cname := C.CString(name) |
| 155 | defer C.free(unsafe.Pointer(cname)) |
| 156 | cop := C.TF_GraphOperationByName(g.c, cname) |
| 157 | if cop == nil { |
| 158 | return nil |
| 159 | } |
| 160 | return &Operation{cop, g} |
| 161 | } |
| 162 | |
| 163 | // Operations returns a list of all operations in the graph |
| 164 | func (g *Graph) Operations() []Operation { |