| 136 | }; |
| 137 | |
| 138 | const Tensor* get_tensor(const YALMData& yalm, const std::string& key) { |
| 139 | auto it = yalm.tensors.find(key); |
| 140 | if (it == yalm.tensors.end()) { |
| 141 | std::cerr << "FATAL: missing tensor: " << key << std::endl; |
| 142 | assert(false); |
| 143 | return nullptr; |
| 144 | } |
| 145 | const Tensor& tensor = it->second; |
| 146 | return &tensor; |
| 147 | }; |
| 148 | |
| 149 | Block::Block( |
| 150 | int layer_i, |