Changes
1 changed files (+5/-5)
-
-
@@ -21,7 +21,7 @@ const EMBED: i64 = 12;const HIDDEN: i64 = 512; const KERNEL: i64 = 16; const WINDOW: usize = 15; const ITERS: usize = 25000; // Iters for length 100 const ITERS: usize = 100000; // Iters for length 100 const THREADS: usize = 4; const VOCAB: usize = 28; // Sorted from lowest to highest freq
-
@@ -227,7 +227,7 @@ // print!("{:>5} ", swaps[i][j] / cnts[i][j] as f64);// Oh no floating point comparison spooky spooky if w[i * VOCAB + j] != 0. { // TODO: adjust this factor w[i * VOCAB + j] = (w[i * VOCAB + j] / 2.5).exp(); w[i * VOCAB + j] = (w[i * VOCAB + j] / 3.).exp(); } // print!("{:5.2} ", w[i * VOCAB + j]); }
-
@@ -251,7 +251,7 @@ }let mut pbest = *p2; let mut lossbest = loss; let mut w = weights(s, &p, &ys); for _ in 0..350 * iters / s.len() { for _ in 0..400 * iters / s.len() { let dist = WeightedIndex::new(&w).unwrap(); let sample = dist.sample(&mut rng); let a = p
-
@@ -307,7 +307,7 @@ let mut rng = Xoshiro256PlusPlus::from_rng(&mut rand::rng());for _ in 0..20 { let mut p = porig; let mut lp = logprob(s, &p, &cnts, grams); for _ in 0..10000 { for _ in 0..2000 { let a = rng.random_range(0..VOCAB); let b = rng.random_range(0..VOCAB); if a != b {
-
@@ -344,7 +344,7 @@ let mut lp = logprob(s, &p, &cnts, grams);let mut pbest = p; let mut lpbest = lp; // TODO: investigate if we need more/less iters here for _ in 0..10000 { for _ in 0..2000 { let a = rng.random_range(0..VOCAB); let b = rng.random_range(0..VOCAB); if a != b {
-