Package

toolkit.neuralnetwork

source

Permalink

package source

Visibility
  1. Public
  2. All

Type Members

  1. case class ByteDataSource(path: String, fieldShape: libcog.Shape, vectorLen: Int, batchSize: Int, fieldCount: Option[Long] = None, updatePeriod: Int = 1, headerLen: Int = 0, resourcePath: String = "src/main/resources/", pipelined: Boolean = true, offset: Int = 0, stride: Int = 1, resetState: Long = 0L) extends DifferentiableField with Product with Serializable

    Permalink
  2. class ByteFileSensor extends AnyRef

    Permalink

    A Cog Sensor that is used to read bytes from a file or jar and format them as a VectorField.

    A Cog Sensor that is used to read bytes from a file or jar and format them as a VectorField. Each byte is interpreted as an element of the VectorField and thus the elements of the resulting field are from 0f to 255f. An updatePeriod greater than one will keep the code constant for multiple Cog ticks and is generally used in cases where inference takes place over multiple ticks due to sampling. When the Sensor hits the end of the file it will reset to the beginning automatically.

    The loader will search for the desired resource in three places. First, a file on the filesystem at path. Second, a file on the filesystem at resourcePath + path. Third, a resource in the classpath at path. The value of resourcePath will typically be "src/main/resources/". Note that fieldCount is mandatory when loading data from the classpath. When loading resources directly from the filesystem, the loader will ignore fieldCount and use the actual length of the file.

    The offset and stride parameters are typically used when multiple graphs are cooperating to train on a single data set. In that case, these parameters can be set such that each graph trains on a different part of the input data set and doesn't duplicate the effort of other graphs. E.g., a stride of two skips every other batch in the input file, so a sensor with offset zero and stride two hits all the even-numbered batches in the file, and a second sensor with offset one and stride two hits all the odd- numbered batches.

  3. case class ByteLabelSource(path: String, numClasses: Int, batchSize: Int, fieldCount: Option[Long] = None, updatePeriod: Int = 1, headerLen: Int = 0, resourcePath: String = "src/main/resources/", pipelined: Boolean = true, offset: Int = 0, stride: Int = 1, resetState: Long = 0L) extends DifferentiableField with Product with Serializable

    Permalink
  4. case class RandomSource(fieldShape: libcog.Shape, vectorLen: Int, batchSize: Int, bits: Int = 12, seed: Option[Long] = None, gradientConsumer: Boolean = false) extends DifferentiableField with Product with Serializable

    Permalink
  5. class SaveParameters extends AnyRef

    Permalink

    Helper class to manage the parameters packed into the single Sensor save/restore parameter string.

    Helper class to manage the parameters packed into the single Sensor save/restore parameter string.

    Parameters are saved as comma-separated key=value parameter definitions. The advantage of using this class is that values that are null strings or contain spaces are OK. Values should not contain the "=" or "," character however.

Value Members

  1. object ByteFileSensor

    Permalink

    The 1D Sensor that sits behind the GPUOperator reshaper in a ByteFileSensor.

    The 1D Sensor that sits behind the GPUOperator reshaper in a ByteFileSensor. This sensor can be saved / restored.

  2. object SaveParameters

    Permalink

Ungrouped