A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/ref/NetGraph.html below:

NetGraph—Wolfram Language Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technology expertise.

WolframConsulting.com

BUILT-IN SYMBOL

NetGraph[{layer1,layer2,},{m1n1,m2n2,}]

specifies a neural net defined by a graph in which the output of layer mi is given as input to layer ni.

NetGraph["name1"layer1,"name2"layer2,,{"namem1""namen1",}]

specifies a net with explicitly named layers.

Details and Options Examplesopen allclose all Basic Examples  (3)

Create a residual net:

Initialize all arrays in the net:

Apply the net to an input:

Convert a NetChain into a NetGraph:

Nest a layer into a NetGraph:

Scope  (14) Construction  (6)

Construct a net consisting of a linear chain:

Some layer names can be omitted and consecutive edge rules can be chained:

The final expressions are identical:

Construct a net graph with an operation requiring two inputs:

Construct a net graph with multiple inputs:

Construct a net graph with multiple outputs:

Construct a net graph with explicitly named layers:

Construct a net graph from existing NetGraph or NetChain:

Special Construction with NetPort  (3)

Create a net where the output is the final internal state of a LongShortTermMemoryLayer:

Apply the net to an input:

Modify the connectivity of an existing graph:

Connect to the inner port of a wrapped NetChain:

Flatten the resulting NetGraph:

Evaluation  (3)

Construct a NetGraph:

Apply the net to an input:

Apply the net to a NumericArray:

Apply the net using double-precision real:

Apply the net using the system's default GPU (if any):

Compute the first-order derivatives of the net:

Create a net with a class decoder:

Evaluate the net:

Retrieve a property of the decoder by specifying a second argument:

Construct a net that explicitly computes a loss:

Initialize the net and evaluate it on an input:

Properties  (2)

Construct a net:

Extract a given layer by position:

Get the list of layers:

Construct a net with explicitly named layers:

Extract a given layer by name:

Get all of the arrays in the net:

Get all layers in an association:

Get the list of edges:

Applications  (1)

Perform multitask learning by creating a net that produces two separate classifications. First, obtain training data:

The training data consists of an image and the corresponding high-level and low-level labels:

Extract the unique labels from the "Label" and "SubLabel" columns:

Create a base convolutional net that will produce a vector of 500 features:

Create a NetGraph that will produce separate classifications for the high-level and low-level labels:

Train the network:

Evaluate the trained network on some example images:

Get probabilities for a single image:

From a random sample, select the images for which the net produces highest and lowest entropy predictions for "Label":

Use NetTake to produce a sub-network that computes only "SubLabel" predictions:

Make a prediction on a single image:

Properties & Relations  (4)

NetChain objects can be used as layers in a NetGraph:

NetGraph objects with one input and one output can be used as layers inside NetChain objects:

The layers used to construct a NetGraph can be extracted using Normal:

Use Information[graph,"SummaryGraphic"] to get a Graphics[] expression that shows the underlying connectivity of a graph:

Possible Issues  (1)

The order in which edges are defined in a NetGraph can matter. Create a NetGraph that computes a matrix-vector dot product:

Reversing the order in which the edges are defined causes a failure, as a vector-matrix product with incompatible dimensions is now computed:

Wolfram Research (2016), NetGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/NetGraph.html (updated 2022). Text

Wolfram Research (2016), NetGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/NetGraph.html (updated 2022).

CMS

Wolfram Language. 2016. "NetGraph." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/NetGraph.html.

APA

Wolfram Language. (2016). NetGraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetGraph.html

BibTeX

@misc{reference.wolfram_2025_netgraph, author="Wolfram Research", title="{NetGraph}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/NetGraph.html}", note=[Accessed: 12-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_netgraph, organization={Wolfram Research}, title={NetGraph}, year={2022}, url={https://reference.wolfram.com/language/ref/NetGraph.html}, note=[Accessed: 12-July-2025 ]}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4