classdef(Abstract) AutogeneratedFromPyTorch < nnet.internal.cnn.layer.Autogenerated
    % AutogeneratedFromPyTorch   Mixin which marks a layer as autogenerated by the PyTorch converter
    %
    % Layer classes automatically generated by the PyTorch importer should
    % subclass this mixin.
    %
    % See also nnet.layer.Layer

    %   Copyright 2023 The MathWorks, Inc.
    
    methods(Access = protected)
        function autogeneratedConstantNames = findAutogeneratedConstants(this, ~)
            % Return a string vector of property names which are
            % autogenerated constant properties: layer properties added by
            % the importer which are not learnables.
            %
            % PyTorch autogenerated constants are names like "Constant_55"
            % which always contain an underscore.

            propNames = string(properties(this));
            autogeneratedConstantNames = propNames(propNames.contains("_"));
        end
    end
end

