Turn on the computational graph. Specify execution mode. Args: mode(bool): when mode is True, model will use computational graph sequential(bool): when sequential is True, model will execute ops in the graph follow the order of joining the graph
(self, mode=True, sequential=False)
| 225 | self.train(mode=False) |
| 226 | |
| 227 | def graph(self, mode=True, sequential=False): |
| 228 | """ Turn on the computational graph. Specify execution mode. |
| 229 | |
| 230 | Args: |
| 231 | mode(bool): when mode is True, model will use computational graph |
| 232 | sequential(bool): when sequential is True, model will execute ops |
| 233 | in the graph follow the order of joining the graph |
| 234 | """ |
| 235 | self.graph_mode = mode |
| 236 | self.sequential = sequential |
| 237 | |
| 238 | def __get_name__(self): |
| 239 | return self.__class__.__name__ |