This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::fs::File; | |
| use std::io::prelude::*; | |
| use std::mem; | |
| fn layernorm_forward(output: &mut [f32], mean: &mut [f32], rstd: &mut [f32], | |
| input: &[f32], weight: &[f32], bias: &[f32], | |
| batch_size: usize, time_steps: usize, channels: usize) { | |
| let epsilon = 1e-5; | |
| for b in 0..batch_size { | |
| for t in 0..time_steps { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install the toolchain | |
| ```bash | |
| brew tap SergioBenitez/osxct | |
| brew install x86_64-unknown-linux-gnu | |
| ``` | |
| # this should get installed in: | |
| # /opt/homebrew/Cellar/x86_64-unknown-linux-gnu/ | |
| # Installing the macOS OpenSSL - if not already installed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "github.com/piotrnar/gocoin/blockdb" | |
| "github.com/piotrnar/gocoin/btc" | |
| "encoding/hex" | |
| ) | |
| func main() { | |
| // Set real Bitcoin network |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "crypto/sha256" | |
| "encoding/binary" | |
| "encoding/hex" | |
| "fmt" | |
| "io" | |
| "log" |