Showing 6,111 of 13,975 total issues
Method createGradFunction
has 355 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void createGradFunction(final String... variablesRequiringGradients) {
if(this.sameDiffFunctionInstances.containsKey(GRAD_FN_KEY))
sameDiffFunctionInstances.remove(GRAD_FN_KEY);
List<String> lossInferred = bestGuessLossVariables();
//Check for external errors function
File NativeOps.java
has 758 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
File DefaultOpExecutioner.java
has 758 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
Method markSatisfied
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
public void markSatisfied(@NonNull D x, boolean satisfied) {
if (satisfied) {
boolean alreadySatisfied = satisfiedDependencies.contains(x);
- Read upRead up
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 checkActivationGradients
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
public static boolean checkActivationGradients(ActGradConfig config){
SameDiff sd = config.getSd();
List<String> actGrads = config.getActivationGradsToCheck();
double maxRelError = config.getMaxRelError();
double minAbsError = config.getMinAbsError();
- Read upRead up
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 fromJson
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
public static MultiLayerConfiguration fromJson(String json) {
MultiLayerConfiguration conf;
ObjectMapper mapper = NeuralNetConfiguration.mapper();
try {
conf = mapper.readValue(json, MultiLayerConfiguration.class);
- Read upRead up
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
Function ChartLine
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
var ChartLine = (function (_super) {
__extends(ChartLine, _super);
function ChartLine(jsonStr) {
var _this = _super.call(this, ComponentType.ChartLine, jsonStr) || this;
_this.render = function (appendToObject) {
- Read upRead up
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 ArrowConverter.java
has 751 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
BaseCudaDataBuffer
has 91 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class BaseCudaDataBuffer extends BaseDataBuffer implements JCudaBuffer, Deallocatable {
@Getter
protected transient volatile AllocationPoint allocationPoint;
public final static long BASE_CUDA_DATA_BUFFER_OFFSET = RandomUtils.nextLong();
UpdateDecoder
has 91 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.UpdateDecoder"})
@SuppressWarnings("all")
public class UpdateDecoder {
public static final int BLOCK_LENGTH = 32;
public static final int TEMPLATE_ID = 2;
File RecordReaderMultiDataSetIterator.java
has 740 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
Method doExec
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
public double doExec(List<BatchItem<T>> items, INDArray inferenceVector) {
try(MemoryWorkspace workspace = Nd4j.getWorkspaceManager().scopeOutOfWorkspaces()) {
boolean useHS = configuration.isUseHierarchicSoftmax();
boolean useNegative = configuration.getNegative() > 0;
boolean useInference = inferenceVector != null;
- Read upRead up
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 deserialize
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
@Override
public MultiLayerConfiguration deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
long charOffsetStart = jp.getCurrentLocation().getCharOffset();
MultiLayerConfiguration conf = (MultiLayerConfiguration) defaultDeserializer.deserialize(jp, ctxt);
- Read upRead up
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 343 lines of code (exceeds 25 allowed). Consider refactoring. Open
public ExecutionResult output(@NonNull List<String> variables,
Map<String, T> placeholderValues,
Map<String, SDValue> otherPlaceHolderValues,
MultiDataSet batch,
Collection<String> requiredActivations,
VectorsConfiguration
has 90 methods (exceeds 20 allowed). Consider refactoring. Open
public class VectorsConfiguration implements Serializable {
// word2vec params
private Integer minWordFrequency = 5;
private Double learningRate = 0.025;
WordVectorSerializer
has 89 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public class WordVectorSerializer {
private static final int MAX_SIZE = 50;
private static final String WHITESPACE_REPLACEMENT = "_Az92_";
File BaseCpuDataBuffer.java
has 724 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
DefaultOpExecutioner
has 88 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public abstract class DefaultOpExecutioner implements OpExecutioner {
private static final String SCOPE_PANIC_MSG = "For more details, see the ND4J User Guide: https://deeplearning4j.konduit.ai/nd4j/overview#workspaces-scope-panic";
DataSet
has 88 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public class DataSet implements org.nd4j.linalg.dataset.api.DataSet {
private static final long serialVersionUID = 1935520764586513365L;
File CpuNDArrayFactory.java
has 722 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the