示例#1
0
 public Context(ContextOptions opts, Status status)
 {
     Handle = c_api.TFE_NewContext(opts.Handle, status.Handle);
     status.Check(true);
     context_switches = new ContextSwitchStack(defaultExecutionMode == EAGER_MODE);
     initialized      = true;
 }
示例#2
0
 public Context()
 {
     _device_policy      = ContextDevicePlacementPolicy.DEVICE_PLACEMENT_SILENT;
     context_switches    = new ContextSwitchStack(defaultExecutionMode == EAGER_MODE, false);
     initialized         = false;
     FunctionCallOptions = new FunctionCallOptions();
 }