Jim Lin
Jim Lin
这个实现性能有很大优化吧。这个无脑 butex 唤醒有问题吧?理想状态下应该有个 flag 标识有没有真的有 bthread 在等待。
我的实现是这样的,由于 bthread 的 butex 没有按 tag 唤醒,有可能产生读写者同时唤醒(惊群) ```c++ #pragma once #include #include #include #include namespace bcache { class SingleWriterBthreadRWLock { public: SingleWriterBthreadRWLock() : flag_(bthread::butex_create_checked()) { *flag_ = 0; } ~SingleWriterBthreadRWLock()...
I met the same case. I almost did the same thing as @mapleFU mentioned above. I guess we can do better. 1. If there are already enough bthread worker to...
I have been thinking those improvements for a while and may try to impl those features in the next half year. Any help is appreciated!
I have the same question. I am really a newbie of deep learning. Here is my thought. The most important thing of back prop algorithm is giving previous layer **up**...
> I have noticed this too and attempted this code for the weight updates: > > ``` > def sigmoidd(x): > s = sigmoid(x) > return s * (1 -...
> For me it just explained how the author came up with the approximation used. The full Taylor series is complicated, true, but it is a common approach to use...
> I am not sure about that either. The derivative is stated on page 173 and given that the code makes sense. I was not able to reproduce the derivative,...
The book is great besides those confusing code fragments. I am mainly an infrastructure engineer so I just skip anything I cannot understand then focus on something I could figure...
Sorry for the different code style... I am used to Google(except exception, etc.)/Facebook cpp code style. It is hard to make me accept "\_" prefixed private class member names instead...