deeplearning4j/deeplearning4j

View on GitHub
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt

Summary

Maintainability
F
1 wk
Test Coverage

Method SDImage has a Cognitive Complexity of 278 (exceeds 20 allowed). Consider refactoring.
Open

fun SDImage() =  Namespace("Image"){
    val namespaceJavaPackage = "org.nd4j.linalg.api.ops.custom"
    Op("CropAndResize") {
        javaPackage = "org.nd4j.linalg.api.ops.impl.image"
        javaOpClass = "CropAndResize"
Severity: Minor
Found in codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt - About 5 days to fix

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

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

    Op("nonMaxSuppression") {
        javaPackage = "org.nd4j.linalg.api.ops.impl.image"
        javaOpClass = "NonMaxSuppression"
        Input(NUMERIC, "boxes") { description = "Might be null. Name for the output variable" }
        Input(NUMERIC, "scores") { description = "vector of shape [num_boxes]" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 282..296

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 352.

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

    Op("resizeBiLinear") {
        javaPackage = "org.nd4j.linalg.api.ops.impl.image"
        javaOpClass = "ResizeBilinear"
        Input(NUMERIC,"input") { description = "4D image"}
        Arg(INT ,"height") { description = "target height for resizing to "}
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 71..87

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 352.

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

    Op("resizeBiCubic") {
        javaPackage = "org.nd4j.linalg.api.ops.impl.image"
        javaOpClass = "ResizeBicubic"
        Input(NUMERIC,"input") { description = "4D image"}
        Input(INT ,"size") { description = "the target size to resize to "}
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/SDBaseOps.kt on lines 604..618

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 311.

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

    Op("adjustHue") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "AdjustHue"
        Input(NUMERIC, "in") { description = "image as 3D array" }
        Arg(NUMERIC, "delta") { description = "value to add to hue channel" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 32..46
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 48..62
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 89..102
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 104..117
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 153..166

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 227.

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

    Op("randomCrop") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "RandomCrop"
        Input(NUMERIC, "input") { description = "input array" }
        Input(INT, "shape") { description = "shape for crop" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 32..46
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 48..62
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 89..102
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 104..117
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 119..132

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 227.

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

    Op("adjustSaturation") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "AdjustSaturation"
        Input(NUMERIC, "in") { description = "RGB image as 3D array" }
        Arg(FLOATING_POINT, "factor") { description = "factor for saturation" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 32..46
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 48..62
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 89..102
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 119..132
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 153..166

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 227.

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

    Op("adjustContrast") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "AdjustContrast"
        Input(NUMERIC, "in") { description = "images to adjust. 3D shape or higher" }
        Arg(FLOATING_POINT, "factor") { description = "multiplier for adjusting contrast" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 32..46
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Bitwise.kt on lines 48..62
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 104..117
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 119..132
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 153..166

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 227.

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

    Op("rgbToHsv") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "RgbToHsv"
        Input(NUMERIC, "input") { description = "3D image" }

codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 182..194
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 196..208
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 210..222
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 224..237
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 239..252

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 186.

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

    Op("hsvToRgb") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "HsvToRgb"
        Input(NUMERIC, "input") { description = "3D image" }

codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 168..180
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 196..208
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 210..222
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 224..237
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 239..252

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 186.

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

    Op("rgbToYiq") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "RgbToYiq"
        Input(NUMERIC, "input") { description = "3D image" }

codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 168..180
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 182..194
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 210..222
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 224..237
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 239..252

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 186.

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

    Op("yuvToRgb") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "YuvToRgb"

        Input(NUMERIC, "input") { description = "3D image" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 168..180
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 182..194
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 196..208
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 210..222
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 224..237

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 186.

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

    Op("rgbToYuv") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "RgbToYuv"

        Input(NUMERIC, "input") { description = "3D image" }
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 168..180
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 182..194
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 196..208
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 210..222
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 239..252

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 186.

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

    Op("yiqToRgb") {
        javaPackage = namespaceJavaPackage
        javaOpClass = "YiqToRgb"
        Input(NUMERIC, "input") { description = "3D image" }

codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 168..180
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 182..194
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 196..208
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 224..237
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt on lines 239..252

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 186.

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

        Arg(INT, "rates") { count = AtLeast(0); description = "Usually [1,1]. Equivalent to dilation rate in dilated convolutions - how far apart the output pixels\n" +
                "                 in the patches should be, in the input. A dilation of [a,b] means every {@code a}th pixel is taken\n" +
                "                 along the height/rows dimension, and every {@code b}th pixel is take along the width/columns dimension" }
Severity: Minor
Found in codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt and 1 other location - About 55 mins to fix
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/NeuralNetwork.kt on lines 41..46

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 87.

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

                "ResizeLanczos5", "ResizeMitchellcubic", "ResizeArea"); description = "ResizeBilinear: Bilinear interpolation. If 'antialias' is true, becomes a hat/tent filter function with radius 1 when downsampling.\n" +
                "ResizeLanczos5: Lanczos kernel with radius 5. Very-high-quality filter but may have stronger ringing.\n" +
                "ResizeBicubic: Cubic interpolant of Keys. Equivalent to Catmull-Rom kernel. Reasonably good quality and faster than Lanczos3Kernel, particularly when upsampling.\n" +
                "ResizeGaussian: Gaussian kernel with radius 3, sigma = 1.5 / 3.0.\n" +
                "ResizeNearest: Nearest neighbor interpolation. 'antialias' has no effect when used with nearest neighbor interpolation.\n" +
Severity: Minor
Found in codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/Image.kt and 1 other location - About 30 mins to fix
codegen/op-codegen/src/main/ops/org/nd4j/codegen/ops/RNN.kt on lines 63..67

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 60.

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