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
| import std/[algorithm, httpclient, math, os, random, sequtils, sets, strformat, strutils, tables] | |
| type | |
| Value = ref object | |
| data, grad: float | |
| ch: seq[Value] | |
| lg: seq[float] | |
| Vec = seq[Value] | |
| Mat = seq[Vec] | |
| SD = OrderedTable[string, Mat] | |
| Cache = seq[Mat] # [layer][time][channel] |
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
| # 2進数を10進数へ | |
| bin2ten() { | |
| echo "ibase=2; $@" | bc | |
| } | |
| # 10進数を2進数へ | |
| ten2bin() { | |
| echo "obase=2; $@" | bc | |
| } |