Main Content

openCustomLayerModel

Class: dlhdl.ProcessorConfig
Namespace: dlhdl

Open a generated custom layer verification model to verify your custom layers

Since R2022a

Description

openCustomLayerModel(processorConfigObject) opens a generated custom layer verification model to verify your custom layers.

openCustomLayerModel(processorConfigObject,Name = Value) opens a generated custom layer verification model to verify your custom layers, with one or more arguments specified by optional name-value arguments.

To call openCustomLayerModel without a Network name-value argument for a custom layer model definition that uses an inputParser object, see Create Custom Layer MATLAB Function with inputParser.

Input Arguments

expand all

Processor configuration, specified as a dlhdl.ProcessorConfig object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example:

Name of the network object that contains your registered custom layer. If you do not include the network argument, Deep Learning HDL Toolbox™ generates a custom network that includes your registered custom layer.

Example: Network = net

Input image, specified as a m-by-n-by-k numeric array. m, n, and k must match the dimensions of the deep learning network input image layer. For example, for the ResNet-18 network, resize the input images to a 224-by-224-by-3 array.

Example: InputImages = image

Data Types: single

Examples

expand all

  1. Before you can generate a test bench model, you must create and register a signum layer. For instructions, see Register Custom Signum Layer.

  2. Generate a test bench model for your custom layer.

    image = randi(255, [2,2,4]);
    % To generate a test network that contains your custom layer do not specify
    %  the Network name-value pair argument
    openCustomLayerModel(hPC, InputImages = single(image));
    % To test your actual network with custom layer specify the Network name-value
    % pair argument. For example, if your custom network name is myNet, at the command line enter:
    %   openCustomLayerModel(hPC, Network = myNet, InputImages = single(image));
    

Version History

Introduced in R2022a