Creates a local task group which will execute as the next step of the current NetBuilder.
(self)
| 236 | return getattr(self.net(), op_type) |
| 237 | |
| 238 | def task_group(self): |
| 239 | """ |
| 240 | Creates a local task group which will execute as the next step of |
| 241 | the current NetBuilder. |
| 242 | """ |
| 243 | from caffe2.python import task |
| 244 | group = NetBuilder.current() |
| 245 | with task.Cluster(): |
| 246 | with task.Node('local'): |
| 247 | tg = task.TaskGroup() |
| 248 | group.add(tg) |
| 249 | return tg |
| 250 | |
| 251 | def stop(self): |
| 252 | """ |