[mlpack] GSoC Proposal Discussion: DAG class & InceptionV3 model

Ryan Curtin ryan at ratml.org
Wed Mar 23 22:04:01 EDT 2022


Sorry for the slow response on this one.  The general idea of the MATLAB
DAGNetwork you linked to is the same basic idea, although I wouldn't
suggest taking design and API ideas from MATLAB. :)

In general I do think that what you proposed is sufficient for a
large-sized project, but I say that because I am thinking about all the
complexities of making an easy-to-use, well-documented `DAGNetwork`
class (or whatever we choose to call it... `DAGN`, like `FFN` and
`RNN`?).  That will take quite some additional time past just
implementing the core support of it.

When you put together a proposal, it's probably worth thinking through
those details: what methods will be necessary for a user to do the kinds
of tasks you expect them to do?  How can we make the API nice?  What
kinds of documentation should we provide and how should we provide it?
How should we structure the code to maximize reuse?  Those are some
questions that I would be thinking if I put together a proposal like
this.  (Of course, there are more that could be asked!  That's just a
few.)

I'm doing my best to get the refactored RNN working and then we can
merge #2777.  I think it's pretty important for the success of this
project and other ones that we are working against master, not against
the `ann-vtable` branch.  So, I really hope to have that ready soon.  At
least personally my goal is just to get RNNs + LSTMs working, so that
the `lstm_stock_prediction` example works.  Then we can merge #2777 with
very limited layer support, and then slowly re-add layers.

That approach may also have ramifications for #2963, because I may not
yet have adapted layers that InceptionV3 depends on (I haven't looked at
that PR so I can't say).  In general adapting layers to the new approach
ranges from "takes 5 minutes" to "start by reading the paper..."
depending on the complexity of the layer.  So, that could be worth
thinking about too.

I hope this information is helpful!  I really want #2777 done soon, so
if my response seems a bit all-over-the-place, it's because I'm actually
thinking about what that bug with the backward passes might be. :)

On Fri, Mar 11, 2022 at 10:29:08PM -0500, Marcus Edel wrote:
> Hello Anwaar,
> 
> first of all, thanks again for all the great contributions over the last months.
> I like the idea, as you already pointed out Ryan is working on a major updated,
> so I'll let him comment on the feasibility, how the approach fits into the updated architecture.
> 
> Thanks,
> Marcus
> 
> > On Mar 10, 2022, at 8:09 PM, Anwaar khalid <khalidanwaar01 at gmail.com> wrote:
> > 
> > Hello everyone,
> > 
> > I'm Anwaar Khalid, currently a 4th year dual degree CS student at IIITDM, India. I've been contributing to mlpack for quite some time now, particularly in the ANN codebase & I wish to spend the summer working with mlpack under GSoC-22. I hope to propose a potential idea for a large project (~350 hours) through this thread & get the community's feedback to help build my proposal.
> > 
> > I really like the idea of building a DAG class for the ANN module. I've been researching and found out that MATLAB also has a DAG framework <https://www.mathworks.com/help/deeplearning/ref/dagnetwork.html> for building complex neural network architectures. I really like how they have approached this & I think we can build a similar interface for mlpack. In PR #2777, Ryan added a `MultiLayer <https://github.com/zoq/mlpack/blob/ann-vtable/src/mlpack/methods/ann/layer/multi_layer.hpp>` class which can be used as the vertices of this DAG network. And we can add an `AddEdge` module which will allow layers to have input from multiple layers and also redirect their output to multiple layers.
> > 
> > Once the DAG class is built, I can adapt my InceptionV3 layers PR <https://github.com/mlpack/mlpack/pull/2963> to use that class & then finally we can add the InceptionV3 model to the models repository. And if there's time left in the end, I can demonstrate the usage of InceptionV3 model in the examples repo by solving a simple image classification task.
> > 
> > I wanted to get the community's opinions on these ideas. Are the number of deliverables sufficient for a large sized project? Looking forward to hearing back from the community :)
> > 
> > 
> > Best
> > Anwaar Khalid
> > Github Username: hello-fri-end
> > _______________________________________________
> > mlpack mailing list
> > mlpack at lists.mlpack.org
> > http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack
> 

> _______________________________________________
> mlpack mailing list
> mlpack at lists.mlpack.org
> http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack


-- 
Ryan Curtin    | "Oh man, I shot Marvin in the face."
ryan at ratml.org |   - Vincent


More information about the mlpack mailing list