alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (NetBroadcastTuple.java)

This example Java source code file (NetBroadcastTuple.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

computationgraphconfiguration, computationgraphupdater, data, indarray, multilayerconfiguration, netbroadcasttuple, serializable, updater

The NetBroadcastTuple.java Java example source code

package org.deeplearning4j.spark.api.worker;

import lombok.Data;
import org.deeplearning4j.nn.api.Updater;
import org.deeplearning4j.nn.conf.ComputationGraphConfiguration;
import org.deeplearning4j.nn.conf.MultiLayerConfiguration;
import org.deeplearning4j.nn.updater.graph.ComputationGraphUpdater;
import org.nd4j.linalg.api.ndarray.INDArray;

import java.io.Serializable;

/**
 * A simple class for storing configurations, parameters and updaters in one class (so they can be broadcast together)
 *
 * @author Alex Black
 */
@Data
public class NetBroadcastTuple implements Serializable {

    private final MultiLayerConfiguration configuration;
    private final ComputationGraphConfiguration graphConfiguration;
    private final INDArray parameters;
    private final Updater updater;
    private final ComputationGraphUpdater graphUpdater;

    public NetBroadcastTuple(MultiLayerConfiguration configuration, INDArray parameters, Updater updater) {
        this(configuration, null, parameters, updater, null);
    }

    public NetBroadcastTuple(ComputationGraphConfiguration graphConfiguration, INDArray parameters, ComputationGraphUpdater graphUpdater) {
        this(null, graphConfiguration, parameters, null, graphUpdater);

    }

    public NetBroadcastTuple(MultiLayerConfiguration configuration, ComputationGraphConfiguration graphConfiguration, INDArray parameters, Updater updater, ComputationGraphUpdater graphUpdater) {
        this.configuration = configuration;
        this.graphConfiguration = graphConfiguration;
        this.parameters = parameters;
        this.updater = updater;
        this.graphUpdater = graphUpdater;
    }
}

Other Java examples (source code examples)

Here is a short list of links related to this Java NetBroadcastTuple.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.