Main Content

isequaln

Check equality of deep learning layer graphs or networks ignoring NaN values

    Description

    example

    tf = isequaln(net1,net2) checks the equality of SeriesNetwork, DAGNetwork, LayerGraph, or dlnetwork objects net1 and net2.

    • If both inputs are SeriesNetwork or DAGNetwork objects, or one of each, then the function returns 1 (true) when the properties and architectures match, ignoring NaN values. Otherwise, the function returns 0 (false).

    • If both inputs are LayerGraph objects, then the function returns 1 (true) when the properties and architectures match, ignoring NaN values. Otherwise, the function returns 0 (false).

    • If both inputs are dlnetwork objects, then the function returns 1 (true) when the properties and architectures match, ignoring NaN values. Otherwise, the function returns 0 (false).

    • For other combinations, the function returns 0 (false).

    tf = isequaln(net1,...,netN) checks equality of the N networks or layer graphs net1, …, netN, ignoring NaN values.

    Examples

    collapse all

    Create two instances of SqueezeNet layer graphs.

    lgraph1 = squeezenet('Weights','none');
    lgraph2 = squeezenet('Weights','none');

    Check if the layer graphs are equal ignoring NaN values using the isequaln function.

    tf = isequaln(lgraph1,lgraph2)
    tf = logical
       1
    
    

    Create two instances of a pretrained SqueezeNet network.

    net1 = squeezenet;
    net2 = squeezenet;

    Check if the networks are equal ignoring NaN values using the isequaln function.

    tf = isequaln(net1,net2)
    tf = logical
       1
    
    

    Input Arguments

    collapse all

    Network or layer graph, specified as a SeriesNetwork, DAGNetwork, dlnetwork , or LayerGraph object.

    Introduced in R2021a