Example #1
0
 /// <summary>
 ///   Read bytes from the file into the given byte tensor.
 /// </summary>
 /// <param name="tensor">A tensor to place the data in after reading it from the file.</param>
 /// <returns>The number of bytes read.</returns>
 public long ReadTensor(AtenSharp.ByteTensor tensor)
 {
     return(THFile_readByteRaw(this.handle, tensor.Data, tensor.NumElements));
 }
 /// <summary>
 ///   Write bytes to the file from the given byte tensor.
 /// </summary>
 /// <param name="tensor">A tensor containing data to be written to the file.</param>
 /// <returns>The number of bytes written.</returns>
 public long WriteTensor(AtenSharp.ByteTensor tensor)
 {
     return(THFile_writeByteRaw(handle, tensor.Data, tensor.NumElements));
 }