-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Convolution component in nnet2 #47
Conversation
Thanks,
Dan On Sun, Aug 2, 2015 at 8:12 PM, Xingyu Na notifications@github.com wrote:
|
OK. I'll write some comment for documentation, making the terms clear. I do have an example script for training ConvNet, including Convolution and Maxpooling. The Maxpooling component was meant to be committed from another PR. I could use one PR for Convolution, Maxpooling and an example script instead of doing these one step at a time. What's your suggestion? |
Let's eventually do it in one pull request, but you can keep updating this On Sun, Aug 2, 2015 at 9:53 PM, Xingyu Na notifications@github.com wrote:
|
BackpropNeedsInput() returns false. Maxpooling component is committed. Both with document and component test code. Example scripts are provided. |
Sorry I haven't gotten to this yet, I'll try to review it in the next few hours. |
[edit: better name than ConvolutionalComponent1d would be Convolutional1dComponent.] |
Hi Dan, thanks for checking.
|
[Yenda and Karel, the part that relates to you is at the end]. Great-- thanks a lot for this!
I noticed some inefficiency in the Convolutional1dComponent::Propagate Now let's consider the backprop code. Currently the code is quite // column_map is indexed by the column-index of "patches", and the value is In the above, I use the word "list" to refer to a std::vector of elements For the core of the Propagate and Backprop functions, rather than have a However, the v2 API has been supported since v4.0 of the CUDA toolkit (i.e. Dan On Fri, Aug 7, 2015 at 12:41 AM, Xingyu Na notifications@github.com wrote:
|
Sorry for pause. Sure, I don't mind. I believe this is necessary for project like Kaldi.
|
Thanks. Sorry for pause. Sure, I don't mind. I believe this is necessary for
|
Hi Dan, I update the code as you suggested, and it worked as expected.
HKUST recipe will be updated independently in another PR. |
We're making progress. A few issues remain..
|
Dan. I'm having trouble rearranging the reversed indexes. The reversing can be done very quickly by parsing the forward_indexes. However, rearranging seems not doable with a single loop. I used many loops with conditions.... It seems very inefficient... Am I missing something? |
You'd probably need a loop first to figure out the maximum list length; On Thu, Aug 13, 2015 at 2:31 AM, Xingyu Na notifications@github.com wrote:
|
Yes that's exactly how I did it. The problem is that the third part, list-to-vector conversion, consumes a lot of conditions to decide which vector to go into. The code is ugly. I need to redo it.... |
It shouldn't be complicated. For each list, just put the i'th element in On Thu, Aug 13, 2015 at 6:11 PM, Xingyu Na notifications@github.com wrote:
|
It works now... There is one thing I don't follow. If the BackpropNeedsInput() return false, the forward data will be deleted, then how are the gradients computed? |
OK, cool. I'll try to review it again soon and maybe merge. On Thu, Aug 13, 2015 at 10:55 PM, Xingyu Na notifications@github.com
|
I'm still working on it. I'll let you know when it's ready for review. |
Indexes operations done. Mutable removed. |
Thanks! Dan On Fri, Aug 14, 2015 at 12:12 AM, Xingyu Na notifications@github.com
|
Sure. Here it is. |
I'm having trouble interpreting these line numbers. For instance, here On Sat, Aug 15, 2015 at 7:38 AM, Xingyu Na notifications@github.com wrote:
|
The line number means where it is called. I post this number because it gives a hint about which step of the prop and backprop the program is stopped at. |
Yes, but what I'm saying is that those line numbers appear not to be On Sat, Aug 15, 2015 at 6:05 PM, Xingyu Na notifications@github.com wrote:
|
OK, it could be you just reversed two of the line numbers. Dan On Sat, Aug 15, 2015 at 10:04 PM, Daniel Povey dpovey@gmail.com wrote:
|
Thanks. It's done. I ran gdb again and ReserveIndexes() didn't appear any more. Instead, more AffineComponent::Backprop showed up. |
Cool- I think we're done! Merging. |
add Convolution component in nnet2
BTW, if you have time at some point, it would be a good thing to take some of the efficiency improvements, and apply them to the nnet1 1d-convolutaional code. |
Cool :) Yes that's exactly what I planned to do. |
Hi, many thanks for the enhancement! (getting back to work after two weeks off) |
Resolve "Long stream for streaming" Closes kaldi-asr#47 See merge request dl/dgx/kaldi!103
Add Convolution component in nnet2, including component test code. The propagation and backprop codes are imported from nnet1. Preliminary test on egs/hkust shows reasonable result in the average parallel framework.