-
Notifications
You must be signed in to change notification settings - Fork 0
block readFromFile
GitHub Action edited this page Jul 9, 2026
·
1 revision
void readFromFile(std::pair<std::pair<std::filesystem::path, std::vector<std::filesystem::path>>, std::filesystem::path> input)Reads from files to initialize the neural network and attention blocks. Used in the constructor.
Returns void
| Parameter | Type | Use | Optional |
|---|---|---|---|
input |
std::pair<std::pair<std::filesystem::path, std::vector<std::filesystem::path>>, std::filesystem::path> |
Input files | ❌ |
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. |
// Calling the readFromFile() function
std::pair<std::pair<std::filesystem::path, std::vector<std::filesystem::path>>, std::filesystem::path> input; // Fill with your filepaths
block b({128, 512, 128}, 128);
b.readFromFile(input);- AIUsage
- Block
- Embedder
- Introduction
- Layer
- Model
- NeuralNetwork
- PositionalEncoding
- SelfAttention
- Tokenizer
- Utility