Package io.github.kirstenali.deepj.nn


package io.github.kirstenali.deepj.nn
Neural networks composed from DeepJ tensors, layers, autograd and backend operations.
  • Class
    Description
    Adapts DeepJ activations to the existing Layer contract.
    Composable encoder/decoder, sharing the same parameter and autograd system as every DeepJ layer.
    Channel-axis (axis 1) normalization, using backend reductions and persistent FLOAT32 running statistics.
    Temporal cross-correlation for [batch, channels, length], sharing the 2D implementation.
    Cross-correlation of [batch, channels, height, width] inputs, using gather and matrix multiplication.
    Inverted dropout.
    Bidirectional multi-head attention with optional padding masks and backend-resident softmax.
    Flattens an inclusive axis range; defaults to preserving the first (batch) axis.
     
    Averages every spatial axis of [batch, channels, ...], returning [batch, channels].
    Batch-first GRU layer; compose layers with Sequential for stacked recurrence.
    Reset-after GRU, with reset/update/candidate gate order and separate projection biases.
    Batch-first LSTM layer; compose layers with Sequential for stacked recurrence.
    LSTM with input/forget/candidate/output gate order and explicit cell memory.
    Additive layer base with recursive training mode and identity-deduplicated parameters.
    First-axis minibatching for images, sequences and matrices, using DeepJ's existing Trainer.
    Versioned parameter/buffer archives for a separately constructed network.
    Max/average pooling of [batch, channels, length] inputs.
    Floor-mode max/average pooling of channel-first images.
     
    Batch-first recurrent sequence execution, with optional lengths and caller-owned initial/final state.
    Shared input/state validation and DeepJ linear projections for recurrent cells.
    Batch-first sequence output and the final state of a recurrent layer.
    Explicit caller-owned state.
    Reshapes the full tensor, with at most one inferred (-1) dimension.
    Batch-first RNN layer; compose layers with Sequential for stacked recurrence.
    Elman recurrent cell with tanh activation.
    Ordered composition of existing or new DeepJ layers.
    Backend copies plus a slicing autograd rule; never reads tensor values on the host.
    Stacked encoder for [batch, time, width] embeddings, with padding masks and masked mean pooling.
    Pre-normalized encoder dimensions.
    Pre-normalized, bidirectional encoder block reusing DeepJ linear layers and LayerNorm.
    Floor-mode spatial window with symmetric zero padding and optional dilation.