what is the difference between LayerGraph and DAGNetwork in deep learning?

조회 수: 13 (최근 30일)
I find that the data structure of LayerGraph and DAGNetwork in neural network toolbox have the same contents. So, is there any difference between them?
  댓글 수: 3
Karthiga Mahalingam
Karthiga Mahalingam 2018년 7월 11일
A LayerGraph is used to specifically describe layout of the layers of a DAG network. It has methods to play around with the layer structure such as addLayers, connectLayers. removeLayers etc. A DAGNetwork is the neural network model as a whole and not just the layers. Its' methods involve playing around with the model like predict, classify, activations etc. In short, you'd be using layerGraph to specify a DAGNetwork but there is much more to it like training it etc.
Jack Xiao
Jack Xiao 2018년 7월 12일
Do they have the same data structure but not same contents?
DAG:
LayerGraph:
(note:the pictures demonstrate two different networks, so the number of layer and connection are different. here I want to know if for a same network, do they have the same data structure but not same contents?)

댓글을 달려면 로그인하십시오.

채택된 답변

Maria Duarte Rosa
Maria Duarte Rosa 2019년 2월 25일
LayerGraphs and Layers contain the network architecture (for DAGs and Series networks, respectively). These objects are then passed to trainNetwork for validation and training. LayerGraphs and Layers may have weights or not, but they cannot be used for prediction. One can only call prediction on DAGNetwork and SeriesNetwork objects. These objects contain the validated and trained network.
From R2018b to convert a LayerGraph and Layers object with weights and all the needed parameters to a DAGNetwork/SeriesNetwork one can call assembleNetwork, example:
net = assembleNetwork(layers);
  댓글 수: 1
Royi Avital
Royi Avital 2021년 12월 2일
One can not use assembleNetwork(layerGraph). Is there a way to validate and initializa a layerGraph without training?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Mingrun Wang
Mingrun Wang 2018년 7월 25일
one is a class,and one is struct.

Mingrun Wang
Mingrun Wang 2018년 7월 25일
the pair of LayerGraph and DAGnetwork remsembles with one of Layer and SeriesNetwork(in my mind)
  댓글 수: 3
Alaa ElDin ElHilaly
Alaa ElDin ElHilaly 2019년 1월 22일
Then how can we convert a LayerGraph we trained to seriesNetwork to use it in classifications?
Handenur Caliskan
Handenur Caliskan 2019년 1월 24일
I have the same situtation too. How can we change the trained layergraph to a seriesnetwork or dagnetwork?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Custom Training Loops에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by