deeplearning4j/deeplearning4j

View on GitHub
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java

Summary

Maintainability
F
1 wk
Test Coverage

SDLoss has 48 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SDLoss extends SDOps {
  public SDLoss(SameDiff sameDiff) {
    super(sameDiff);
  }

    File SDLoss.java has 432 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     *  ******************************************************************************
     *  *
     *  *
     *  * This program and the accompanying materials are made available under the

      Method logLoss has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        public SDVariable logLoss(String name, SDVariable label, SDVariable predictions,
            SDVariable weights, LossReduce lossReduce, double epsilon) {

        Method huberLoss has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          public SDVariable huberLoss(String name, SDVariable label, SDVariable predictions,
              SDVariable weights, LossReduce lossReduce, double delta) {

          Method cosineDistance has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            public SDVariable cosineDistance(String name, SDVariable label, SDVariable predictions,
                SDVariable weights, LossReduce lossReduce, int dimension) {

            Method ctcLoss has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              public SDVariable ctcLoss(String name, SDVariable targetLabels, SDVariable logitInput,
                  SDVariable targetLabelLengths, SDVariable logitInputLengths, int blankIndex) {

              Method softmaxCrossEntropy has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                public SDVariable softmaxCrossEntropy(String name, SDVariable oneHotLabels,
                    SDVariable logitPredictions, SDVariable weights, LossReduce lossReduce,
                    double labelSmoothing) {

                Method logPoisson has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  public SDVariable logPoisson(String name, SDVariable label, SDVariable predictions,
                      SDVariable weights, LossReduce lossReduce, boolean full) {

                  Method sigmoidCrossEntropy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    public SDVariable sigmoidCrossEntropy(String name, SDVariable label, SDVariable predictionLogits,
                        SDVariable weights, LossReduce lossReduce, double labelSmoothing) {

                    Method softmaxCrossEntropy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      public SDVariable softmaxCrossEntropy(SDVariable oneHotLabels, SDVariable logitPredictions,
                          SDVariable weights, LossReduce lossReduce, double labelSmoothing) {

                      Method cosineDistance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        public SDVariable cosineDistance(String name, SDVariable label, SDVariable predictions,
                            SDVariable weights, int dimension) {

                        Method huberLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          public SDVariable huberLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                              LossReduce lossReduce, double delta) {

                          Method logLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            public SDVariable logLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                                LossReduce lossReduce, double epsilon) {

                            Method meanSquaredError has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              public SDVariable meanSquaredError(String name, SDVariable label, SDVariable predictions,
                                  SDVariable weights, LossReduce lossReduce) {

                              Method hingeLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                public SDVariable hingeLoss(String name, SDVariable label, SDVariable predictions,
                                    SDVariable weights, LossReduce lossReduce) {

                                Method meanPairwiseSquaredError has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  public SDVariable meanPairwiseSquaredError(String name, SDVariable label, SDVariable predictions,
                                      SDVariable weights, LossReduce lossReduce) {

                                  Method ctcLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    public SDVariable ctcLoss(SDVariable targetLabels, SDVariable logitInput,
                                        SDVariable targetLabelLengths, SDVariable logitInputLengths, int blankIndex) {

                                    Method logPoisson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      public SDVariable logPoisson(SDVariable label, SDVariable predictions, SDVariable weights,
                                          LossReduce lossReduce, boolean full) {

                                      Method cosineDistance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                        public SDVariable cosineDistance(SDVariable label, SDVariable predictions, SDVariable weights,
                                            LossReduce lossReduce, int dimension) {

                                        Method absoluteDifference has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                          public SDVariable absoluteDifference(String name, SDVariable label, SDVariable predictions,
                                              SDVariable weights, LossReduce lossReduce) {

                                          Method logPoisson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                            public SDVariable logPoisson(String name, SDVariable label, SDVariable predictions,
                                                SDVariable weights, boolean full) {

                                            Method ctcLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                              public SDVariable ctcLoss(String name, SDVariable targetLabels, SDVariable logitInput,
                                                  SDVariable targetLabelLengths, SDVariable logitInputLengths) {

                                              Method sigmoidCrossEntropy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                public SDVariable sigmoidCrossEntropy(SDVariable label, SDVariable predictionLogits,
                                                    SDVariable weights, LossReduce lossReduce, double labelSmoothing) {

                                                Method huberLoss has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                  public SDVariable huberLoss(String name, SDVariable label, SDVariable predictions,
                                                      SDVariable weights, double delta) {

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable cosineDistance(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, int dimension) {
                                                      SDValidation.validateNumerical("cosineDistance", "label", label);
                                                      SDValidation.validateNumerical("cosineDistance", "predictions", predictions);
                                                      SDValidation.validateNumerical("cosineDistance", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 474..482
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 661..669

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 92.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable huberLoss(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, double delta) {
                                                      SDValidation.validateNumerical("huberLoss", "label", label);
                                                      SDValidation.validateNumerical("huberLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("huberLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 199..207
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 661..669

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 92.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logPoisson(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, boolean full) {
                                                      SDValidation.validateNumerical("logPoisson", "label", label);
                                                      SDValidation.validateNumerical("logPoisson", "predictions", predictions);
                                                      SDValidation.validateNumerical("logPoisson", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 199..207
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 474..482

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 92.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable softmaxCrossEntropy(String name, SDVariable oneHotLabels,
                                                        SDVariable logitPredictions, SDVariable weights) {
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "oneHotLabels", oneHotLabels);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "logitPredictions", logitPredictions);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 954..962

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 91.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable sigmoidCrossEntropy(String name, SDVariable label, SDVariable predictionLogits,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "label", label);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "predictionLogits", predictionLogits);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1069..1077

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 91.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable absoluteDifference(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("absoluteDifference", "label", label);
                                                      SDValidation.validateNumerical("absoluteDifference", "predictions", predictions);
                                                      SDValidation.validateNumerical("absoluteDifference", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 370..378
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 749..757
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 832..840

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 89.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanSquaredError(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("meanSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 103..111
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 370..378
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 749..757

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 89.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable hingeLoss(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("hingeLoss", "label", label);
                                                      SDValidation.validateNumerical("hingeLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("hingeLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 103..111
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 749..757
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 832..840

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 89.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanPairwiseSquaredError(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 103..111
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 370..378
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 832..840

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 89.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable huberLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        double delta) {
                                                      SDValidation.validateNumerical("huberLoss", "label", label);
                                                      SDValidation.validateNumerical("huberLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("huberLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 175..183
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 640..648

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 85.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logPoisson(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        boolean full) {
                                                      SDValidation.validateNumerical("logPoisson", "label", label);
                                                      SDValidation.validateNumerical("logPoisson", "predictions", predictions);
                                                      SDValidation.validateNumerical("logPoisson", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 175..183
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 448..456

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 85.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable cosineDistance(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        int dimension) {
                                                      SDValidation.validateNumerical("cosineDistance", "label", label);
                                                      SDValidation.validateNumerical("cosineDistance", "predictions", predictions);
                                                      SDValidation.validateNumerical("cosineDistance", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 448..456
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 640..648

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 85.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable sigmoidCrossEntropy(SDVariable label, SDVariable predictionLogits,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "label", label);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "predictionLogits", predictionLogits);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1041..1049

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 84.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable softmaxCrossEntropy(SDVariable oneHotLabels, SDVariable logitPredictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "oneHotLabels", oneHotLabels);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "logitPredictions", logitPredictions);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 924..932

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 84.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable cosineDistance(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce, int dimension) {
                                                      SDValidation.validateNumerical("cosineDistance", "label", label);
                                                      SDValidation.validateNumerical("cosineDistance", "predictions", predictions);
                                                      SDValidation.validateNumerical("cosineDistance", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 423..431
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 544..552
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 620..628
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 895..903
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1013..1022

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable sigmoidCrossEntropy(String name, SDVariable label, SDVariable predictionLogits,
                                                        SDVariable weights, LossReduce lossReduce, double labelSmoothing) {
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "label", label);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "predictionLogits", predictionLogits);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 152..160
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 423..431
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 544..552
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 620..628
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1013..1022

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logPoisson(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce, boolean full) {
                                                      SDValidation.validateNumerical("logPoisson", "label", label);
                                                      SDValidation.validateNumerical("logPoisson", "predictions", predictions);
                                                      SDValidation.validateNumerical("logPoisson", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 152..160
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 423..431
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 544..552
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 895..903
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1013..1022

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable huberLoss(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce, double delta) {
                                                      SDValidation.validateNumerical("huberLoss", "label", label);
                                                      SDValidation.validateNumerical("huberLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("huberLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 152..160
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 544..552
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 620..628
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 895..903
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1013..1022

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable softmaxCrossEntropy(String name, SDVariable oneHotLabels,
                                                        SDVariable logitPredictions, SDVariable weights, LossReduce lossReduce,
                                                        double labelSmoothing) {
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "oneHotLabels", oneHotLabels);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "logitPredictions", logitPredictions);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 152..160
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 423..431
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 544..552
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 620..628
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 895..903

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logLoss(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce, double epsilon) {
                                                      SDValidation.validateNumerical("logLoss", "label", label);
                                                      SDValidation.validateNumerical("logLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("logLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 152..160
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 423..431
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 620..628
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 895..903
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 1013..1022

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 83.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable hingeLoss(SDVariable label, SDVariable predictions, SDVariable weights) {
                                                      SDValidation.validateNumerical("hingeLoss", "label", label);
                                                      SDValidation.validateNumerical("hingeLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("hingeLoss", "weights", weights);
                                                      SDVariable out = new org.nd4j.linalg.api.ops.impl.loss.HingeLoss(sd,label, predictions, weights, org.nd4j.autodiff.loss.LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT).outputVariable();
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 84..92
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 727..735
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 812..819

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 82.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanPairwiseSquaredError(SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 84..92
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 350..357
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 812..819

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 82.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanSquaredError(SDVariable label, SDVariable predictions, SDVariable weights) {
                                                      SDValidation.validateNumerical("meanSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanSquaredError", "weights", weights);
                                                      SDVariable out = new org.nd4j.linalg.api.ops.impl.loss.MeanSquaredErrorLoss(sd,label, predictions, weights, org.nd4j.autodiff.loss.LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT).outputVariable();
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 84..92
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 350..357
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 727..735

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 82.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable absoluteDifference(SDVariable label, SDVariable predictions,
                                                        SDVariable weights) {
                                                      SDValidation.validateNumerical("absoluteDifference", "label", label);
                                                      SDValidation.validateNumerical("absoluteDifference", "predictions", predictions);
                                                      SDValidation.validateNumerical("absoluteDifference", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 350..357
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 727..735
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 812..819

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 82.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanPairwiseSquaredError(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 66..74
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 330..338
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 792..800

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 80.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable hingeLoss(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("hingeLoss", "label", label);
                                                      SDValidation.validateNumerical("hingeLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("hingeLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 66..74
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 706..714
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 792..800

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 80.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanSquaredError(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("meanSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 66..74
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 330..338
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 706..714

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 80.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable absoluteDifference(String name, SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("absoluteDifference", "label", label);
                                                      SDValidation.validateNumerical("absoluteDifference", "predictions", predictions);
                                                      SDValidation.validateNumerical("absoluteDifference", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 330..338
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 706..714
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 792..800

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 80.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce, double epsilon) {
                                                      SDValidation.validateNumerical("logLoss", "label", label);
                                                      SDValidation.validateNumerical("logLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("logLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 127..135
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 396..404
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 598..606
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 863..871
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 983..991

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable logPoisson(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce, boolean full) {
                                                      SDValidation.validateNumerical("logPoisson", "label", label);
                                                      SDValidation.validateNumerical("logPoisson", "predictions", predictions);
                                                      SDValidation.validateNumerical("logPoisson", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 127..135
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 396..404
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 522..530
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 863..871
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 983..991

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable huberLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce, double delta) {
                                                      SDValidation.validateNumerical("huberLoss", "label", label);
                                                      SDValidation.validateNumerical("huberLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("huberLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 127..135
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 522..530
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 598..606
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 863..871
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 983..991

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable softmaxCrossEntropy(SDVariable oneHotLabels, SDVariable logitPredictions,
                                                        SDVariable weights, LossReduce lossReduce, double labelSmoothing) {
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "oneHotLabels", oneHotLabels);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "logitPredictions", logitPredictions);
                                                      SDValidation.validateNumerical("softmaxCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 127..135
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 396..404
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 522..530
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 598..606
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 863..871

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable cosineDistance(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce, int dimension) {
                                                      SDValidation.validateNumerical("cosineDistance", "label", label);
                                                      SDValidation.validateNumerical("cosineDistance", "predictions", predictions);
                                                      SDValidation.validateNumerical("cosineDistance", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 396..404
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 522..530
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 598..606
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 863..871
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 983..991

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 6 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable sigmoidCrossEntropy(SDVariable label, SDVariable predictionLogits,
                                                        SDVariable weights, LossReduce lossReduce, double labelSmoothing) {
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "label", label);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "predictionLogits", predictionLogits);
                                                      SDValidation.validateNumerical("sigmoidCrossEntropy", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 127..135
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 396..404
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 522..530
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 598..606
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 983..991

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 76.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable hingeLoss(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("hingeLoss", "label", label);
                                                      SDValidation.validateNumerical("hingeLoss", "predictions", predictions);
                                                      SDValidation.validateNumerical("hingeLoss", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 46..54
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 683..691
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 770..778

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 73.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable absoluteDifference(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("absoluteDifference", "label", label);
                                                      SDValidation.validateNumerical("absoluteDifference", "predictions", predictions);
                                                      SDValidation.validateNumerical("absoluteDifference", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 308..316
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 683..691
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 770..778

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 73.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanPairwiseSquaredError(SDVariable label, SDVariable predictions,
                                                        SDVariable weights, LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanPairwiseSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 46..54
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 308..316
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 770..778

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 73.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                                  Open

                                                    public SDVariable meanSquaredError(SDVariable label, SDVariable predictions, SDVariable weights,
                                                        LossReduce lossReduce) {
                                                      SDValidation.validateNumerical("meanSquaredError", "label", label);
                                                      SDValidation.validateNumerical("meanSquaredError", "predictions", predictions);
                                                      SDValidation.validateNumerical("meanSquaredError", "weights", weights);
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 46..54
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 308..316
                                                  nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java on lines 683..691

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 73.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status