Ejemplo n.º 1
0
 /// <summary>
 ///   Write doubles to the file from the given double tensor.
 /// </summary>
 /// <param name="tensor">A tensor containing data to be written to the file.</param>
 /// <returns>The number of doubles written.</returns>
 public long WriteTensor(AtenSharp.DoubleTensor tensor)
 {
     return(THFile_writeDoubleRaw(this.handle, tensor.Data, tensor.NumElements));
 }
Ejemplo n.º 2
0
 /// <summary>
 ///   Read doubles from the file into the given double tensor.
 /// </summary>
 /// <param name="tensor">A tensor to place the data in after reading it from the file.</param>
 /// <returns>The number of doubles read.</returns>
 public long ReadTensor(AtenSharp.DoubleTensor tensor)
 {
     return(THFile_readDoubleRaw(handle, tensor.Data, tensor.NumElements));
 }