Buckets:
| using namespace neuroflow; | |
| int main() { | |
| std::cout << "LayerNorm class test..." << std::endl; | |
| // Create LayerNorm | |
| std::cout << "Creating LayerNorm(32)..." << std::endl; | |
| LayerNorm norm(32); | |
| std::cout << "weight shape size: " << norm.weight.shape_.size() << std::endl; | |
| std::cout << "weight shape[0]: " << norm.weight.shape_[0] << std::endl; | |
| std::cout << "weight numel: " << norm.weight.numel() << std::endl; | |
| std::cout << "weight data_size: " << norm.weight.data_size_ << std::endl; | |
| std::cout << "bias shape size: " << norm.bias.shape_.size() << std::endl; | |
| std::cout << "bias shape[0]: " << norm.bias.shape_[0] << std::endl; | |
| std::cout << "bias numel: " << norm.bias.numel() << std::endl; | |
| std::cout << "bias data_size: " << norm.bias.data_size_ << std::endl; | |
| // Create input | |
| Tensor input({2, 32}); | |
| float* id = input.as_fp32(); | |
| for (size_t i = 0; i < input.numel(); ++i) id[i] = 0.1f * i; | |
| std::cout << "Calling norm.forward(input)..." << std::endl; | |
| Tensor output = norm.forward(input); | |
| std::cout << "output shape: [" << output.shape_[0] << ", " << output.shape_[1] << "]" << std::endl; | |
| std::cout << "Success!" << std::endl; | |
| return 0; | |
| } | |
Xet Storage Details
- Size:
- 1.36 kB
- Xet hash:
- 8a5f490ae6422806fd1c30965aed5b4caab20999d7c5e21c83e0819e2969dffe
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.