Example usage for org.deeplearning4j.nn.conf.layers Layer clone

List of usage examples for org.deeplearning4j.nn.conf.layers Layer clone

Introduction

In this page you can find the example usage for org.deeplearning4j.nn.conf.layers Layer clone.

Prototype

@Override
    public Layer clone() 

Source Link

Usage

From source file:org.knime.ext.dl4j.base.util.DLModelPortObjectUtils.java

License:Open Source License

/**
 * Returns a cloned list of the specified list of {@link Layer}s.
 *
 * @param layers the list of layers to clone
 * @return clone of specified list of layers
 *//*  w w w .  j  a v  a 2  s  .  c o m*/
public static List<Layer> cloneLayers(final List<Layer> layers) {
    final List<Layer> layersClone = new ArrayList<>();
    for (final Layer l : layers) {
        layersClone.add(l.clone());
    }
    return layersClone;
}