Package ai.djl.nn

Class ParameterList

  • All Implemented Interfaces:
    java.lang.Iterable<ai.djl.util.Pair<java.lang.String,​Parameter>>

    public class ParameterList
    extends ai.djl.util.PairList<java.lang.String,​Parameter>
    Represents a set of names and Parameters.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterList()
      Create an empty ParameterList.
      ParameterList​(int initialCapacity)
      Constructs an empty ParameterList with the specified initial capacity.
      ParameterList​(java.util.List<ai.djl.util.Pair<java.lang.String,​Parameter>> list)
      Constructs a ParameterList containing the elements of the specified list of Pairs.
      ParameterList​(java.util.List<java.lang.String> keys, java.util.List<Parameter> values)
      Constructs a ParameterList containing the elements of the specified keys and values.
      ParameterList​(java.util.Map<java.lang.String,​Parameter> map)
      Constructs a ParameterList containing the elements of the specified map.
    • Method Summary

      • Methods inherited from class ai.djl.util.PairList

        add, add, add, addAll, clear, contains, get, get, indexOf, isEmpty, iterator, keyArray, keyAt, keys, remove, remove, size, stream, subList, subList, toMap, toMap, unique, valueArray, valueAt, values
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ParameterList

        public ParameterList()
        Create an empty ParameterList.
      • ParameterList

        public ParameterList​(int initialCapacity)
        Constructs an empty ParameterList with the specified initial capacity.
        Parameters:
        initialCapacity - the initial capacity of the list
        Throws:
        java.lang.IllegalArgumentException - if the specified initial capacity is negative
      • ParameterList

        public ParameterList​(java.util.List<java.lang.String> keys,
                             java.util.List<Parameter> values)
        Constructs a ParameterList containing the elements of the specified keys and values.
        Parameters:
        keys - the key list containing the elements to be placed into this ParameterList
        values - the value list containing the elements to be placed into this ParameterList
        Throws:
        java.lang.IllegalArgumentException - if the keys and values size are different
      • ParameterList

        public ParameterList​(java.util.List<ai.djl.util.Pair<java.lang.String,​Parameter>> list)
        Constructs a ParameterList containing the elements of the specified list of Pairs.
        Parameters:
        list - the list containing the elements to be placed into this ParameterList
      • ParameterList

        public ParameterList​(java.util.Map<java.lang.String,​Parameter> map)
        Constructs a ParameterList containing the elements of the specified map.
        Parameters:
        map - the map containing keys and values