Manuscript Psy03-C@1 · Psy03-C-v1.tex · section · d3380b90

Dimensions, masks, and the PyTorch cell

The actual recurrent model › Dimensions, masks, and the PyTorch cell · lines 240–296

Psy03-C@1#eq:counts, Psy03-C@1#eq:cell

Back to manuscript

The source uses input dimension , hidden dimension , four output classes, and repeated sequences of length .

With biases enabled, its parameter counts are

Thus

The configured feed-forward hidden_dims do not determine this GRU architecture.

For each weight tensor, let be its active mask and its permanent-scar mask. The admissibility condition is

Effective weights are stored with deleted coordinates zero. Biases are not pruned.

Split the effective input and recurrent weights into reset, update, and candidate blocks:

The packed tensors are ordered . For and , the actual cell is

These are the PyTorch GRUCell equations PyTorchGRU. In particular, the reset gate multiplies the hidden affine term including . The alternative expression is not substituted.

The candidate uses tanh and the gates use sigmoid even when the source switches its external activation to ReLU.

Displayed formulas in this passage

  • Psy03-C@1#eq:cell · line 278

  • unlabeled · line 246

  • Psy03-C@1#eq:counts · line 252

  • unlabeled · line 264

  • unlabeled · line 272