示例#1
0
 /// <summary>
 /// Construct and return the tensorflow Server
 /// </summary>
 /// <param name="proto">Serialized FunctionDef</param>
 /// <param name="status">The status</param>
 public Server(byte[] proto, Status status = null)
 {
     using (StatusChecker checker = new StatusChecker(status))
     {
         GCHandle handle = GCHandle.Alloc(proto, GCHandleType.Pinned);
         _ptr = TfInvoke.tfeNewServer(handle.AddrOfPinnedObject(), proto.Length, checker.Status);
         handle.Free();
     }
 }