object Writer
Binary serialization for Tensor with primitive Double, Float, Long
The layout of binary format is as follows: - The first 6 bytes are "LAMP" - The next unsigned byte is the major version - The next unsigned byte is the minor version - The next 4 bytes form a little endian integer as HEADER_LENGTH - The next HEADER_LENGTH bytes form an UTF-8 string as the header. - The header is a valid JSON object with the following fields:
- v: numeric positive integer is the version of the header structure
- shape: numeric array
- datatype : string, either "double", "long", "int", "float", "byte" - The header is padded with spaces (0x20) such that HEADER_LENGTH+12 is divisible by 16. The count of spaces are included in HEADER_LENGTH. - The next width * shape.reduce(_ * _) bytes form a little endian primitive array.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Writer
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val KEY_datatype: String
- val KEY_shape: String
- val KEY_v: String
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createHeader(descriptor: Either[String, String]): Either[String, Array[Byte]]
- def createTensorDescriptor[T](tensor: Tensor)(implicit arg0: ST[T]): Either[String, String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def put[T](t: Array[T], bb: ByteBuffer)(implicit arg0: ST[T]): Either[String, Unit]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tensorToArray[T](tensor: Tensor, elem: Int)(implicit arg0: ST[T]): Array[T]
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def writeCheckpoint[A, B](file: File, model: GenericModule[A, B]): IO[Either[String, Seq[Unit]]]
- def writeFully(bb: ByteBuffer, channel: WritableByteChannel): Unit
- def writeTensorIntoArray[T](tensor: Tensor)(implicit arg0: ST[T]): Either[String, Array[Byte]]
- def writeTensorIntoChannel[T](tensor: Tensor, channel: WritableByteChannel)(implicit arg0: ST[T]): Either[String, Unit]
- def writeTensorsIntoChannel(tensors: Seq[Tensor], channel: WritableByteChannel): Either[String, Seq[Unit]]