- ドキュメントの品質改善
- ドキュメントのクオリティーを上げてください。現状のドキュメントは必ずしも品質が良いとはいえません。読みやすい英語、詳細な仕様など、改善点はたくさんあります。
- CuPyの関数充実
- 606, 602, 677, 701
- CuPyの関数はNumPyの一部しか実装されていません。elementwiseやreductionでかける関数は、比較的低コストで実装できます
- テスト充実
- 569, 568
- 一部のモジュールはテストがかけています。テストの充実は品質向上に役立つ上に、コードの理解につながります
- Chainer.functionsの追加
- 1160, 1133, 1085, 1027, 945
This file contains 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
digits = Capture(r"\d+", int) | |
date = Seq( | |
(digits, "/", digits, "/", digits), | |
lambda year, _1, month, _2, day: datetime.date(year, month, day), | |
) | |
date_time = Seq( | |
(digits, "/", digits, "/", digits, " ", digits, ":", digits), | |
lambda year, _1, month, _2, day, _3, hour, _4, minute: datetime.datetime(year, month, day, hour, minute), | |
) | |
span = Seq(((date | date_time), "-", (date | date_time)), lambda begin, _, end: (begin, end)) |
This file contains 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 cupy as xp | |
import cupy.prof | |
import chainer | |
from chainer.functions.activation import lstm | |
B = 1024 | |
D = 2048 | |
x_shape = (B, D * 4) | |
c_shape = (B, D) |
This file contains 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 sys | |
import numpy | |
if __name__ == '__main__': | |
with numpy.load(sys.argv[1]) as f: | |
print(f.keys()) |
This file contains 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 contextlib | |
import time | |
import chainer | |
import chainer.functions as F | |
import cupy | |
@contextlib.contextmanager | |
def timer(message): |
This file contains 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 numpy | |
import chainer | |
import chainer.functions as F | |
import chainer.links as L | |
class LongChain(chainer.Chain): | |
def __init__(self): | |
super(LongChain, self).__init__() |
This file contains 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
def StatefullRNNUnit(chainer.Chain): | |
def StatefullRNNUnit(self, rnn): | |
self.rnn = rnn | |
self.state = (None,) * rnn.n_state | |
def __call__(x): | |
args = self.state + (x,) | |
ret = self.rnn(*args) | |
self.state = ret[:-1] | |
return ret[-1] |
This file contains 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 chainer | |
from chainer import cuda | |
import cupy | |
import numpy | |
import time | |
ls = numpy.random.randint(1, 100, size=1000) | |
ls = numpy.sort(ls)[::-1] | |
unit = 100 | |
xs = [cupy.empty((l, unit), 'f') for l in ls] |
This file contains 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 chainer | |
from chainer import cuda | |
import chainer.functions as F | |
import chainer.links as L | |
import chainer.optimizers as O | |
import cupy | |
import numpy | |
class MyModel(chainer.Chain): |
NewerOlder