Using @SuperBuilder for LayerConfigurations
Signed-off-by: brian <brian@brutex.de>master
parent
ad870c5281
commit
9139940101
|
@ -90,7 +90,7 @@ public abstract class NumericalColumnAnalysis implements ColumnAnalysis {
|
||||||
public abstract double getMaxDouble();
|
public abstract double getMaxDouble();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public abstract static class Builder<T extends Builder<T>> {
|
public static abstract class Builder<T extends Builder<T>> {
|
||||||
protected double mean;
|
protected double mean;
|
||||||
protected double sampleStdev;
|
protected double sampleStdev;
|
||||||
protected double sampleVariance;
|
protected double sampleVariance;
|
||||||
|
|
|
@ -970,7 +970,7 @@ public class InferenceSession extends AbstractSession<INDArray, Pair<SameDiffOp,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public abstract static class Dep {
|
public static abstract class Dep {
|
||||||
protected String frame;
|
protected String frame;
|
||||||
protected FrameIter parentFrame;
|
protected FrameIter parentFrame;
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,7 +555,7 @@ public abstract class NeuralNetBaseBuilderConfiguration implements INeuralNetwor
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class NeuralNetBaseBuilderConfigurationBuilder<
|
public static abstract class NeuralNetBaseBuilderConfigurationBuilder<
|
||||||
C extends NeuralNetBaseBuilderConfiguration,
|
C extends NeuralNetBaseBuilderConfiguration,
|
||||||
B extends NeuralNetBaseBuilderConfiguration.NeuralNetBaseBuilderConfigurationBuilder<C, B>> {
|
B extends NeuralNetBaseBuilderConfiguration.NeuralNetBaseBuilderConfigurationBuilder<C, B>> {
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class ActivationLayer extends NoParamLayer {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class ActivationLayerBuilder<
|
public static abstract class ActivationLayerBuilder<
|
||||||
C extends ActivationLayer, B extends ActivationLayerBuilder<C, B>>
|
C extends ActivationLayer, B extends ActivationLayerBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -202,7 +202,7 @@ public abstract class BaseLayerConfiguration extends LayerConfiguration
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class BaseLayerConfigurationBuilder<
|
public static abstract class BaseLayerConfigurationBuilder<
|
||||||
C extends BaseLayerConfiguration, B extends BaseLayerConfigurationBuilder<C, B>>
|
C extends BaseLayerConfiguration, B extends BaseLayerConfigurationBuilder<C, B>>
|
||||||
extends LayerConfigurationBuilder<C, B> {
|
extends LayerConfigurationBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class Cnn3DLossLayer extends FeedForwardLayer {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Cnn3DLossLayerBuilder<
|
public static abstract class Cnn3DLossLayerBuilder<
|
||||||
C extends Cnn3DLossLayer, B extends Cnn3DLossLayerBuilder<C, B>>
|
C extends Cnn3DLossLayer, B extends Cnn3DLossLayerBuilder<C, B>>
|
||||||
extends FeedForwardLayerBuilder<C, B> {
|
extends FeedForwardLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class Convolution1DLayer extends ConvolutionLayer {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Convolution1DLayerBuilder<
|
public static abstract class Convolution1DLayerBuilder<
|
||||||
C extends ConvolutionLayer, B extends Convolution1DLayerBuilder<C, B>>
|
C extends ConvolutionLayer, B extends Convolution1DLayerBuilder<C, B>>
|
||||||
extends ConvolutionLayerBuilder<C, B> {
|
extends ConvolutionLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class Convolution3D extends ConvolutionLayer {
|
||||||
|
|
||||||
// public Builder(int[] kernelSize, int[] stride, int[] padding, int[] dilation) {
|
// public Builder(int[] kernelSize, int[] stride, int[] padding, int[] dilation) {
|
||||||
// sup/er(kernelSize, stride, padding, dilation, 3);
|
// sup/er(kernelSize, stride, padding, dilation, 3);
|
||||||
public abstract static class Convolution3DBuilder<
|
public static abstract class Convolution3DBuilder<
|
||||||
C extends Convolution3D, B extends Convolution3DBuilder<C, B>>
|
C extends Convolution3D, B extends Convolution3DBuilder<C, B>>
|
||||||
extends ConvolutionLayer.ConvolutionLayerBuilder<C, B> {
|
extends ConvolutionLayer.ConvolutionLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -355,7 +355,7 @@ public class ConvolutionLayer extends FeedForwardLayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public abstract static class ConvolutionLayerBuilder<
|
public static abstract class ConvolutionLayerBuilder<
|
||||||
C extends ConvolutionLayer, B extends ConvolutionLayerBuilder<C, B>>
|
C extends ConvolutionLayer, B extends ConvolutionLayerBuilder<C, B>>
|
||||||
extends FeedForwardLayerBuilder<C, B> {
|
extends FeedForwardLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class Deconvolution3D extends ConvolutionLayer {
|
||||||
//private int[] padding;
|
//private int[] padding;
|
||||||
//private int[] dilation;
|
//private int[] dilation;
|
||||||
|
|
||||||
public abstract static class Deconvolution3DBuilder<
|
public static abstract class Deconvolution3DBuilder<
|
||||||
C extends Deconvolution3D, B extends Deconvolution3DBuilder<C, B>>
|
C extends Deconvolution3D, B extends Deconvolution3DBuilder<C, B>>
|
||||||
extends ConvolutionLayerBuilder<C, B> {
|
extends ConvolutionLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class DropoutLayer extends FeedForwardLayer {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class DropoutLayerBuilder<
|
public static abstract class DropoutLayerBuilder<
|
||||||
C extends DropoutLayer, B extends DropoutLayerBuilder<C, B>>
|
C extends DropoutLayer, B extends DropoutLayerBuilder<C, B>>
|
||||||
extends FeedForwardLayerBuilder<C, B> {
|
extends FeedForwardLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class LearnedSelfAttentionLayer extends SameDiffLayer {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class LearnedSelfAttentionLayerBuilder<
|
public static abstract class LearnedSelfAttentionLayerBuilder<
|
||||||
C extends LearnedSelfAttentionLayer, B extends LearnedSelfAttentionLayerBuilder<C, B>>
|
C extends LearnedSelfAttentionLayer, B extends LearnedSelfAttentionLayerBuilder<C, B>>
|
||||||
extends SameDiffLayerBuilder<C, B> {
|
extends SameDiffLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class LocalResponseNormalization extends LayerConfiguration {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class LocalResponseNormalizationBuilder<
|
public static abstract class LocalResponseNormalizationBuilder<
|
||||||
C extends LocalResponseNormalization, B extends LocalResponseNormalizationBuilder<C, B>>
|
C extends LocalResponseNormalization, B extends LocalResponseNormalizationBuilder<C, B>>
|
||||||
extends LayerConfigurationBuilder<C, B> {
|
extends LayerConfigurationBuilder<C, B> {
|
||||||
public B helperAllowFallback(boolean b) {
|
public B helperAllowFallback(boolean b) {
|
||||||
|
|
|
@ -319,7 +319,7 @@ public class LocallyConnected2D extends SameDiffLayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class LocallyConnected2DBuilder<
|
public static abstract class LocallyConnected2DBuilder<
|
||||||
C extends LocallyConnected2D, B extends LocallyConnected2DBuilder<C, B>>
|
C extends LocallyConnected2D, B extends LocallyConnected2DBuilder<C, B>>
|
||||||
extends SameDiffLayerBuilder<C, B> {
|
extends SameDiffLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class LossLayer extends FeedForwardLayer {
|
||||||
return EmptyParamInitializer.getInstance();
|
return EmptyParamInitializer.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class LossLayerBuilder<
|
public static abstract class LossLayerBuilder<
|
||||||
C extends LossLayer, B extends LossLayerBuilder<C, B>>
|
C extends LossLayer, B extends LossLayerBuilder<C, B>>
|
||||||
extends FeedForwardLayerBuilder<C, B> {
|
extends FeedForwardLayerBuilder<C, B> {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class OutputLayer extends BaseOutputLayer {
|
||||||
return DefaultParamInitializer.getInstance();
|
return DefaultParamInitializer.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class OutputLayerBuilder<
|
public static abstract class OutputLayerBuilder<
|
||||||
C extends OutputLayer, B extends OutputLayerBuilder<C, B>>
|
C extends OutputLayer, B extends OutputLayerBuilder<C, B>>
|
||||||
extends BaseOutputLayerBuilder<C, B> {
|
extends BaseOutputLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class PReLULayer extends BaseLayerConfiguration {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class PReLULayerBuilder<
|
public static abstract class PReLULayerBuilder<
|
||||||
C extends PReLULayer, B extends PReLULayerBuilder<C, B>>
|
C extends PReLULayer, B extends PReLULayerBuilder<C, B>>
|
||||||
extends BaseLayerConfigurationBuilder<C, B> {
|
extends BaseLayerConfigurationBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class PrimaryCapsules extends SameDiffLayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class PrimaryCapsulesBuilder<
|
public static abstract class PrimaryCapsulesBuilder<
|
||||||
C extends PrimaryCapsules, B extends PrimaryCapsulesBuilder<C, B>>
|
C extends PrimaryCapsules, B extends PrimaryCapsulesBuilder<C, B>>
|
||||||
extends SameDiffLayerBuilder<C, B> {
|
extends SameDiffLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class RnnLossLayer extends FeedForwardLayer {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class RnnLossLayerBuilder<
|
public static abstract class RnnLossLayerBuilder<
|
||||||
C extends RnnLossLayer, B extends RnnLossLayerBuilder<C, B>>
|
C extends RnnLossLayer, B extends RnnLossLayerBuilder<C, B>>
|
||||||
extends FeedForwardLayerBuilder<C, B> {
|
extends FeedForwardLayerBuilder<C, B> {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class SelfAttentionLayer extends SameDiffLayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class SelfAttentionLayerBuilder<
|
public static abstract class SelfAttentionLayerBuilder<
|
||||||
C extends SelfAttentionLayer, B extends SelfAttentionLayerBuilder<C, B>>
|
C extends SelfAttentionLayer, B extends SelfAttentionLayerBuilder<C, B>>
|
||||||
extends SameDiffLayerBuilder<C, B> {
|
extends SameDiffLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class SeparableConvolution2D extends ConvolutionLayer {
|
||||||
SeparableConvolution2DLayer.class);
|
SeparableConvolution2DLayer.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class SeparableConvolution2DBuilder<
|
public static abstract class SeparableConvolution2DBuilder<
|
||||||
C extends SeparableConvolution2D, B extends SeparableConvolution2DBuilder<C, B>>
|
C extends SeparableConvolution2D, B extends SeparableConvolution2DBuilder<C, B>>
|
||||||
extends ConvolutionLayerBuilder<C, B> {
|
extends ConvolutionLayerBuilder<C, B> {
|
||||||
public C build() {
|
public C build() {
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class SpaceToBatchLayer extends NoParamLayer {
|
||||||
throw new UnsupportedOperationException("SpaceToBatchLayer does not contain parameters");
|
throw new UnsupportedOperationException("SpaceToBatchLayer does not contain parameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class SpaceToBatchLayerBuilder<
|
public static abstract class SpaceToBatchLayerBuilder<
|
||||||
C extends SpaceToBatchLayer, B extends SpaceToBatchLayerBuilder<C, B>>
|
C extends SpaceToBatchLayer, B extends SpaceToBatchLayerBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -281,7 +281,7 @@ public class Subsampling3DLayer extends NoParamLayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Subsampling3DLayerBuilder<
|
public static abstract class Subsampling3DLayerBuilder<
|
||||||
C extends Subsampling3DLayer, B extends Subsampling3DLayerBuilder<C, B>>
|
C extends Subsampling3DLayer, B extends Subsampling3DLayerBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -385,7 +385,7 @@ public class SubsamplingLayer extends NoParamLayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class SubsamplingLayerBuilder<
|
public static abstract class SubsamplingLayerBuilder<
|
||||||
C extends SubsamplingLayer, B extends SubsamplingLayerBuilder<C, B>>
|
C extends SubsamplingLayer, B extends SubsamplingLayerBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class ZeroPadding1DLayer extends NoParamLayer {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class ZeroPadding1DLayerBuilder<
|
public static abstract class ZeroPadding1DLayerBuilder<
|
||||||
C extends ZeroPadding1DLayer, B extends ZeroPadding1DLayerBuilder<C, B>>
|
C extends ZeroPadding1DLayer, B extends ZeroPadding1DLayerBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
public B padding(int... padding) {
|
public B padding(int... padding) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class Cropping1D extends NoParamLayer {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Cropping1DBuilder<
|
public static abstract class Cropping1DBuilder<
|
||||||
C extends Cropping1D, B extends Cropping1DBuilder<C, B>>
|
C extends Cropping1D, B extends Cropping1DBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
public B cropping(int... cropping) {
|
public B cropping(int... cropping) {
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class Cropping2D extends NoParamLayer {
|
||||||
this.dataFormat = ((InputType.InputTypeConvolutional) inputType).getFormat();
|
this.dataFormat = ((InputType.InputTypeConvolutional) inputType).getFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Cropping2DBuilder<
|
public static abstract class Cropping2DBuilder<
|
||||||
C extends Cropping2D, B extends Cropping2DBuilder<C, B>>
|
C extends Cropping2D, B extends Cropping2DBuilder<C, B>>
|
||||||
extends NoParamLayerBuilder<C, B> {
|
extends NoParamLayerBuilder<C, B> {
|
||||||
public B cropping(int... cropping) {
|
public B cropping(int... cropping) {
|
||||||
|
|
|
@ -245,7 +245,7 @@ public abstract class AbstractSameDiffLayer extends LayerConfiguration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class AbstractSameDiffLayerBuilder<
|
public static abstract class AbstractSameDiffLayerBuilder<
|
||||||
C extends AbstractSameDiffLayer, B extends AbstractSameDiffLayerBuilder<C, B>>
|
C extends AbstractSameDiffLayer, B extends AbstractSameDiffLayerBuilder<C, B>>
|
||||||
extends LayerConfigurationBuilder<C, B> {
|
extends LayerConfigurationBuilder<C, B> {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class VariationalAutoencoder extends BasePretrainNetwork {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class VariationalAutoencoderBuilder<
|
public static abstract class VariationalAutoencoderBuilder<
|
||||||
C extends VariationalAutoencoder, B extends VariationalAutoencoderBuilder<C, B>>
|
C extends VariationalAutoencoder, B extends VariationalAutoencoderBuilder<C, B>>
|
||||||
extends BasePretrainNetworkBuilder<C, B> {
|
extends BasePretrainNetworkBuilder<C, B> {
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class OCNNOutputLayer extends BaseOutputLayer {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class OCNNOutputLayerBuilder<
|
public static abstract class OCNNOutputLayerBuilder<
|
||||||
C extends OCNNOutputLayer, B extends OCNNOutputLayerBuilder<C, B>>
|
C extends OCNNOutputLayer, B extends OCNNOutputLayerBuilder<C, B>>
|
||||||
extends BaseOutputLayerBuilder<C, B> {
|
extends BaseOutputLayerBuilder<C, B> {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue