MCPcopy Create free account
hub / github.com/apache/singa / graph

Method graph

examples/cnn_ms/pkg_model_code/model.py:227–236  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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__

Callers 3

runFunction · 0.45
trainFunction · 0.45
trainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected