ComputationGraph or non-sequential example?

I have the need to create a non-sequential model using LSTM layers. Is there an example that shows how to combine ComputationGraph and regular layers into a model?

When I google this, I get references to examples on the deeplearning4j wiki, but those links do not work anymore.

Tx
K

@kgoderis could you clarify where you were looking? If you were on https://deeplearning4j.org/ that is not the place to look anymore. Please use https://deeplearning4j.konduit.ai/ if you still have questions after that please go ahead and follow up.

I don’t quite know what you’re looking for but all of our examples are here: GitHub - eclipse/deeplearning4j-examples: Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)

Well, I looked at *.ai in the first place.

Growing the forum I understand that you can freely mix AddLayer and AddVertex as long as they are named/labelled correctly.

A kind of network is to have a LSTM → LSTM → SomeLayer on the right, and DenseLayer → … → SomeLayer at the left, e.g. merge 2 sequential branches into 1 at a given point, and from that have SomeLayer → DenseLayer → … → OutputLayer

@kgoderis You might want to look at this page for a comprehensive explanation:

Use cases are here ^

You have the basic idea that the dl4j api has 2 kinds: a computation graph (harder to use but allows more general architectures) and the sequential kind (the multilayernetwork)

There’s also samediff if you’re looking for something pytorch like and is generally .
See: Quickstart - Deeplearning4j

Could you clarify what the docs or examples are missing so maybe we can help you better in the future? Thanks for the input!

Indeed, that was my initial thinking when going through the documentation. It was not clear that both kinds can be combined. Just did a quick search, came across this link (https://deeplearning4j.konduit.ai/models/computationgraph#example-2-multiple-inputs-and-merge-vertex) which is seemingly not working anymore. Just as an example

What would really helping is making it quite explicit how ones goes beyond sequential models, and how to combine them with Vertexes and also custom SameDiff layers. In essence, the question that always pop-up with me when reading an interesting ML paper is : how to implement this? Often people introduce new types of layers, or variations on an “old” theme (e.g. how easy is it to subclass an existing layer like LSTM or whatever)

Due to a reorganization of the docs (and because gitbook changes links without any regard for breaking links or good tooling to manually take care of this :confused: ) many links got broken. But at least the doc search should bring you to the correct place.

Yes, you are right. I will start by rereading all the wiki pages since they seemingly answer what I was after