Fix compiler warnings

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-10-04 17:04:08 +02:00
parent 18e1717a13
commit 1749b9e4af
11 changed files with 18 additions and 14 deletions

View File

@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
@Deprecated @Deprecated
@Data @Data
@EqualsAndHashCode(exclude = {"auc"}, callSuper = false) @EqualsAndHashCode(callSuper = false)
public class RocCurve extends org.nd4j.evaluation.curves.RocCurve { public class RocCurve extends org.nd4j.evaluation.curves.RocCurve {
/** /**

View File

@ -36,7 +36,6 @@ import java.util.Arrays;
@NoArgsConstructor @NoArgsConstructor
@Data @Data
@EqualsAndHashCode(callSuper = false)
public class LayerVertex extends GraphVertex { public class LayerVertex extends GraphVertex {
private NeuralNetConfiguration layerConf; private NeuralNetConfiguration layerConf;

View File

@ -21,6 +21,7 @@
package org.deeplearning4j.nn.conf.layers.misc; package org.deeplearning4j.nn.conf.layers.misc;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.deeplearning4j.nn.api.ParamInitializer; import org.deeplearning4j.nn.api.ParamInitializer;
import org.deeplearning4j.nn.api.layers.LayerConstraint; import org.deeplearning4j.nn.api.layers.LayerConstraint;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
@ -38,6 +39,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
@Data @Data
@EqualsAndHashCode(callSuper = false)
public class FrozenLayerWithBackprop extends BaseWrapperLayer { public class FrozenLayerWithBackprop extends BaseWrapperLayer {
public FrozenLayerWithBackprop(@JsonProperty("layer") Layer layer) { public FrozenLayerWithBackprop(@JsonProperty("layer") Layer layer) {

View File

@ -21,6 +21,7 @@
package org.deeplearning4j.nn.conf.layers.samediff; package org.deeplearning4j.nn.conf.layers.samediff;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.deeplearning4j.nn.api.MaskState; import org.deeplearning4j.nn.api.MaskState;
import org.deeplearning4j.nn.api.TrainingConfig; import org.deeplearning4j.nn.api.TrainingConfig;
import org.deeplearning4j.nn.conf.GradientNormalization; import org.deeplearning4j.nn.conf.GradientNormalization;
@ -44,6 +45,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Data @Data
@EqualsAndHashCode(callSuper = false)
public abstract class SameDiffVertex extends GraphVertex implements TrainingConfig { public abstract class SameDiffVertex extends GraphVertex implements TrainingConfig {
private SDVertexParams vertexParams; private SDVertexParams vertexParams;

View File

@ -20,10 +20,7 @@
package org.deeplearning4j.nn.conf.layers.util; package org.deeplearning4j.nn.conf.layers.util;
import lombok.Data; import lombok.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.deeplearning4j.nn.conf.InputPreProcessor; import org.deeplearning4j.nn.conf.InputPreProcessor;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.inputs.InputType; import org.deeplearning4j.nn.conf.inputs.InputType;
@ -38,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection; import java.util.Collection;
@Data @Data
@EqualsAndHashCode(callSuper = false)
public class MaskZeroLayer extends BaseWrapperLayer { public class MaskZeroLayer extends BaseWrapperLayer {
private double maskingValue = 0.0; private double maskingValue = 0.0;

View File

@ -21,6 +21,7 @@
package org.deeplearning4j.nn.conf.layers.wrapper; package org.deeplearning4j.nn.conf.layers.wrapper;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.deeplearning4j.nn.api.ParamInitializer; import org.deeplearning4j.nn.api.ParamInitializer;
import org.deeplearning4j.nn.conf.GradientNormalization; import org.deeplearning4j.nn.conf.GradientNormalization;
import org.deeplearning4j.nn.conf.InputPreProcessor; import org.deeplearning4j.nn.conf.InputPreProcessor;
@ -33,6 +34,7 @@ import org.nd4j.linalg.learning.regularization.Regularization;
import java.util.List; import java.util.List;
@Data @Data
@EqualsAndHashCode(callSuper = false)
public abstract class BaseWrapperLayer extends Layer { public abstract class BaseWrapperLayer extends Layer {
protected Layer underlying; protected Layer underlying;

View File

@ -61,7 +61,7 @@ public class AeronNDArrayPublisher implements AutoCloseable {
public final static int NUM_RETRIES = 100; public final static int NUM_RETRIES = 100;
private boolean compress = true; private boolean compress = true;
private static final BusySpinIdleStrategy busySpinIdleStrategy = new BusySpinIdleStrategy(); private static final BusySpinIdleStrategy busySpinIdleStrategy = new BusySpinIdleStrategy();
private int publishRetryTimeOut = 3000; @Builder.Default private int publishRetryTimeOut = 3000;
private void init() { private void init() {
channel = channel == null ? "aeron:udp?endpoint=localhost:40123" : channel; channel = channel == null ? "aeron:udp?endpoint=localhost:40123" : channel;

View File

@ -45,7 +45,7 @@ public class AeronNDArraySubscriber implements AutoCloseable {
private String channel; private String channel;
// A unique identifier for a stream within a channel. Stream ID 0 is reserved // A unique identifier for a stream within a channel. Stream ID 0 is reserved
// for internal use and should not be used by applications. // for internal use and should not be used by applications.
private int streamId = -1; @Builder.Default private int streamId = -1;
// Maximum number of message fragments to receive during a single 'poll' operation // Maximum number of message fragments to receive during a single 'poll' operation
private int fragmentLimitCount; private int fragmentLimitCount;
// Create a context, needed for client connection to media driver // Create a context, needed for client connection to media driver
@ -57,7 +57,7 @@ public class AeronNDArraySubscriber implements AutoCloseable {
private NDArrayCallback ndArrayCallback; private NDArrayCallback ndArrayCallback;
private Aeron aeron; private Aeron aeron;
private Subscription subscription; private Subscription subscription;
private AtomicBoolean launched = new AtomicBoolean(false); @Builder.Default private AtomicBoolean launched = new AtomicBoolean(false);
private Executor executors; private Executor executors;

View File

@ -50,7 +50,8 @@ public class NDArrayMessage implements Serializable {
private long index; private long index;
private int[] dimensions; private int[] dimensions;
private byte[] chunk; private byte[] chunk;
private int numChunks = 0;
@Builder.Default private int numChunks = 0;
//default dimensions: a 1 length array of -1 means use the whole array for an update. //default dimensions: a 1 length array of -1 means use the whole array for an update.
private static int[] WHOLE_ARRAY_UPDATE = {-1}; private static int[] WHOLE_ARRAY_UPDATE = {-1};
//represents the constant for indicating using the whole array for an update (-1) //represents the constant for indicating using the whole array for an update (-1)

View File

@ -43,17 +43,17 @@ public class AeronNDArrayResponder implements AutoCloseable {
private String channel; private String channel;
// A unique identifier for a stream within a channel. Stream ID 0 is reserved // A unique identifier for a stream within a channel. Stream ID 0 is reserved
// for internal use and should not be used by applications. // for internal use and should not be used by applications.
private int streamId = -1; @Builder.Default private int streamId = -1;
// A unique identifier for a stream within a channel. Stream ID 0 is reserved // A unique identifier for a stream within a channel. Stream ID 0 is reserved
// for internal use and should not be used by applications. // for internal use and should not be used by applications.
private int responseStreamId = -1; @Builder.Default private int responseStreamId = -1;
// Maximum number of message fragments to receive during a single 'poll' operation // Maximum number of message fragments to receive during a single 'poll' operation
private int fragmentLimitCount; private int fragmentLimitCount;
// Create a context, needed for client connection to media driver // Create a context, needed for client connection to media driver
// A separate media driver process need to run prior to running this application // A separate media driver process need to run prior to running this application
private Aeron.Context ctx; private Aeron.Context ctx;
private AtomicBoolean running = new AtomicBoolean(true); @Builder.Default private AtomicBoolean running = new AtomicBoolean(true);
private final AtomicBoolean init = new AtomicBoolean(false); private final AtomicBoolean init = new AtomicBoolean(false);
private static Logger log = LoggerFactory.getLogger(AeronNDArrayResponder.class); private static Logger log = LoggerFactory.getLogger(AeronNDArrayResponder.class);
private NDArrayHolder ndArrayHolder; private NDArrayHolder ndArrayHolder;

View File

@ -42,7 +42,7 @@ public class HostPortPublisher implements AutoCloseable {
private int streamId; private int streamId;
// The channel (an endpoint identifier) to send the message to // The channel (an endpoint identifier) to send the message to
private String channel; private String channel;
private boolean init = false; @Builder.Default private boolean init = false;
private Aeron.Context ctx; private Aeron.Context ctx;
private Aeron aeron; private Aeron aeron;
private Publication publication; private Publication publication;