Skip to content

block block

GitHub Action edited this page Jul 9, 2026 · 1 revision

Constructors

block(std::vector<size_t> dimensions, size_t n_embd)

Initializes a new neural network and self attention blocks following the dimensions passed as paramaters.

block(std::pair<std::pair<std::filesystem::path, std::vector<std::filesystem::path>>, std::filesystem::path> input)

Reads saved neural network and self attention blocks from the inputed filepaths. input.first.first is the dimensions of the network, input.first.second is a vector of each file for each layer of the network, and input.second is the file for the self attention block.


Basic Info

A wrapper class that holds a neuralNetwork and a selfAttention block.

Instance Variables

Variable Type
network neuralNetwork
attention selfAttention
n_embd size_t

Functions


Example

// Initializing a block
block b({128, 512, 128}, 128);

Clone this wiki locally