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.
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!
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 ) many links got broken. But at least the doc search should bring you to the correct place.