deeplearning4j/deeplearning4j

View on GitHub

Showing 6,577 of 14,310 total issues

File CudaExecutioner.java has 1618 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*******************************************************************************
 * Copyright (c) 2015-2018 Skymind, Inc.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License, Version 2.0 which is available at

    File BaseDataBuffer.java has 1517 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*******************************************************************************
     * Copyright (c) 2015-2018 Skymind, Inc.
     *
     * This program and the accompanying materials are made available under the
     * terms of the Apache License, Version 2.0 which is available at

      NDArrayFactory has 199 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public interface NDArrayFactory {
      
      
          char FORTRAN = 'f';
          char C = 'c';

        MultiLayerNetwork has 196 methods (exceeds 20 allowed). Consider refactoring.
        Open

        @Slf4j
        public class MultiLayerNetwork implements Serializable, Classifier, Layer, NeuralNetwork {
        
            //the hidden neural network layers (including output layer)
            protected Layer[] layers;

          File NativeOpExecutioner.java has 1468 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*******************************************************************************
           * Copyright (c) 2015-2018 Skymind, Inc.
           *
           * This program and the accompanying materials are made available under the
           * terms of the Apache License, Version 2.0 which is available at

            File StaticInfoEncoder.java has 1456 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*******************************************************************************
             * Copyright (c) 2015-2018 Skymind, Inc.
             *
             * This program and the accompanying materials are made available under the
             * terms of the Apache License, Version 2.0 which is available at

              ComputationGraph has 191 methods (exceeds 20 allowed). Consider refactoring.
              Open

              @Slf4j
              public class ComputationGraph implements Serializable, Model, NeuralNetwork {
              
                  protected ComputationGraphConfiguration configuration;
                  protected boolean initCalled = false;

                File SDBaseOps.java has 1428 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*******************************************************************************
                 * Copyright (c) 2019-2020 Konduit K.K.
                 *
                 * This program and the accompanying materials are made available under the
                 * terms of the Apache License, Version 2.0 which is available at

                  File TrainModule.java has 1428 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* ******************************************************************************
                   * Copyright (c) 2015-2018 Skymind, Inc.
                   * Copyright (c) 2019 Konduit K.K.
                   *
                   * This program and the accompanying materials are made available under the

                    StaticInfoDecoder has 183 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    @javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.StaticInfoDecoder"})
                    @SuppressWarnings("all")
                    public class StaticInfoDecoder {
                        public static final int BLOCK_LENGTH = 40;
                        public static final int TEMPLATE_ID = 1;

                      Function readGraphStructure has a Cognitive Complexity of 178 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function readGraphStructure(){
                          //First: load data
                          if (file) {
                              var fr = new FileReader();
                              var fileData = new Blob([file]);            //TODO Don't load the whole file into memory at once!

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      File BaseCudaDataBuffer.java has 1349 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*******************************************************************************
                       * Copyright (c) 2015-2018 Skymind, Inc.
                       *
                       * This program and the accompanying materials are made available under the
                       * terms of the Apache License, Version 2.0 which is available at

                        File dl4j-ui.js has 1332 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*******************************************************************************
                         * Copyright (c) 2015-2018 Skymind, Inc.
                         *
                         * This program and the accompanying materials are made available under the
                         * terms of the Apache License, Version 2.0 which is available at

                          File dl4j-ui.js has 1318 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          var __extends = (this && this.__extends) || function (d, b) {
                              for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
                              function __() { this.constructor = d; }
                              d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
                          };

                            File UpdateEncoder.java has 1298 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*******************************************************************************
                             * Copyright (c) 2015-2018 Skymind, Inc.
                             *
                             * This program and the accompanying materials are made available under the
                             * terms of the Apache License, Version 2.0 which is available at

                              File SDMath.java has 1278 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*******************************************************************************
                               * Copyright (c) 2019-2020 Konduit K.K.
                               *
                               * This program and the accompanying materials are made available under the
                               * terms of the Apache License, Version 2.0 which is available at

                                Method run has a Cognitive Complexity of 158 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public SharedTrainingResult run(SharedTrainingWorker worker) {
                                        /*
                                            first call instantiates pw, messenger etc, and gets in charge here.
                                         */
                                        if (isFirst.compareAndSet(false, true)) {

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method output has a Cognitive Complexity of 151 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public Map<String, T> output(@NonNull List<String> variables, Map<String, T> placeholderValues,
                                                                 MultiDataSet batch, Collection<String> requiredActivations, List<Listener> listeners, At at) {
                                        Preconditions.checkState(!variables.isEmpty() || !requiredActivations.isEmpty(), "Variables to perform forward pass for must not be empty");
                                
                                        if (requiredActivations == null)

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Method fitHelper has a Cognitive Complexity of 148 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    protected synchronized History fitHelper(@NonNull MultiDataSetIterator iter, int numEpochs, boolean incrementEpochCount,
                                                                             MultiDataSetIterator validationData, int validationFrequency, @NonNull List<Listener> listeners) {
                                        Preconditions.checkNotNull(iter, "Iterator must not be null");
                                        Preconditions.checkState(numEpochs > 0, "Number of training epochs must be a positive number. Got: %s", numEpochs);
                                        Preconditions.checkState(trainingConfig != null, "No training configuration has been set. A training configuration must " +

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                StaticInfoEncoder has 152 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                @javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.StaticInfoEncoder"})
                                @SuppressWarnings("all")
                                public class StaticInfoEncoder {
                                    public static final int BLOCK_LENGTH = 40;
                                    public static final int TEMPLATE_ID = 1;
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language