tensorflow/tensorflow

View on GitHub
tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py

Summary

Maintainability
F
2 wks
Test Coverage

File depthwise_conv_op_base.py has 938 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 2 days to fix

    DepthwiseConv2DBase has 26 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DepthwiseConv2DBase(test.TestCase):
      """Base test class for depthwise Conv2D tests."""
    
      # This tests depthwise_conv2d and depthwise_conv2d_native
      def _VerifyValues(self,
    Severity: Minor
    Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 3 hrs to fix

      Function _VerifyValues has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

        def _VerifyValues(self,
                          tensor_in_sizes,
                          filter_in_sizes,
                          stride,
                          padding,
      Severity: Minor
      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 2 hrs 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

      Function _DepthwiseConv2dNumpy has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      def _DepthwiseConv2dNumpy(x1, x2, strides, padding, data_format, dilations):
        """Compute depthwise_conv2d using Numpy.
      
        This allows use to test TensorFlow's depthwise_conv2d by comparing to the
        Numpy version.
      Severity: Minor
      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 2 hrs 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

      Function testDepthwiseConv2DExplicit has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

        def testDepthwiseConv2DExplicit(self):
          for index, (input_size, filter_size, _, stride, padding,
                      dilations) in enumerate(ConfigsToTestExplicit()):
            tf_logging.info(
                "Testing DepthwiseConv2D, %dth config: %r * %r, stride: %d, padding: "
      Severity: Minor
      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr 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

      Function _ConstructAndTestGradient has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

        def _ConstructAndTestGradient(self,
                                      input_shape,
                                      filter_shape,
                                      output_shape,
                                      stride,
      Severity: Minor
      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr 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

      Function _ConstructAndTestGradient has 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def _ConstructAndTestGradient(self,
      Severity: Major
      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr to fix

        Function _VerifyValues has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def _VerifyValues(self,
        Severity: Major
        Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr to fix

          Function testDepthwiseConv2DInputGradExplicit has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

            def testDepthwiseConv2DInputGradExplicit(self):
              for index, (input_size, filter_size, output_size, stride, padding,
                          dilations) in enumerate(CheckGradConfigsToTestExplicit()):
                tf_logging.info(
                    "Testing DepthwiseConv2DInputGradExplicit, %dth config: %r * %r, "
          Severity: Minor
          Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr 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

          Function testDepthwiseConv2DFilterGradExplicit has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

            def testDepthwiseConv2DFilterGradExplicit(self):
              for index, (input_size, filter_size, output_size, stride, padding,
                          dilations) in enumerate(CheckGradConfigsToTestExplicit()):
                tf_logging.info(
                    "Testing DepthwiseConv2DFilterGradExplicit, %dth config: %r * %r, "
          Severity: Minor
          Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 1 hr 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

          Function testDepthwiseConv2DFormat has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

            def testDepthwiseConv2DFormat(self):
              if not test.is_gpu_available():
                return
          
              for index, (input_size, filter_size, _, stride, padding,
          Severity: Minor
          Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 55 mins 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

          Function _CompareBackpropFilter has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def _CompareBackpropFilter(self, input_sizes, filter_sizes, output_sizes,
          Severity: Minor
          Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

            Function _VerifyHandValues has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def _VerifyHandValues(self, tensor_in_sizes, filter_in_sizes, stride, padding,
            Severity: Minor
            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

              Function Config has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def Config(input_size,
              Severity: Minor
              Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                Function _CompareBackpropInput has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def _CompareBackpropInput(self, input_sizes, filter_sizes, output_sizes,
                Severity: Minor
                Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                  Function Config has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def Config(input_size,
                  Severity: Minor
                  Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                    Function _DepthwiseConv2dNumpy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _DepthwiseConv2dNumpy(x1, x2, strides, padding, data_format, dilations):
                    Severity: Minor
                    Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                      Function Config has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        def Config(input_size,
                      Severity: Minor
                      Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                        Function _CompareForward has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def _CompareForward(self, input_sizes, filter_sizes, output_sizes, stride,
                        Severity: Minor
                        Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                          Function Config has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            def Config(input_size,
                          Severity: Minor
                          Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins to fix

                            Function testDepthwiseConv2D has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def testDepthwiseConv2D(self):
                                for index, (input_size, filter_size, _, stride, padding,
                                            dilations) in enumerate(ConfigsToTest()):
                                  tf_logging.info(
                                      "Testing DepthwiseConv2D, %dth config: %r * %r, stride: %d, padding: "
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 45 mins 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

                            Function _DepthwiseConv2dNumpyBasic has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def _DepthwiseConv2dNumpyBasic(x1, x2, strides):
                              """Compute depthwise_conv2d using Numpy.
                            
                              This allows use to test TensorFlow's depthwise_conv2d by comparing to the
                              Numpy version.
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 25 mins 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

                            Function testDepthwiseConv2DInputGradFormat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def testDepthwiseConv2DInputGradFormat(self):
                                if not test.is_gpu_available():
                                  return
                            
                                for index, (input_size, filter_size, output_size, stride, padding,
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 25 mins 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

                            Function testDepthwiseConv2DFilterGradFormat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def testDepthwiseConv2DFilterGradFormat(self):
                                if not test.is_gpu_available():
                                  return
                            
                                for index, (input_size, filter_size, output_size, stride, padding,
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py - About 25 mins 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

                              @test_util.run_v1_only("b/120545219")
                              def testDepthwiseConv2DFilterGradExplicit(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(CheckGradConfigsToTestExplicit()):
                                  tf_logging.info(
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 825..847

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

                            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

                              @test_util.run_v1_only("b/120545219")
                              def testDepthwiseConv2DInputGradExplicit(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(CheckGradConfigsToTestExplicit()):
                                  tf_logging.info(
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 938..960

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

                            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

                              @test_util.run_v1_only("b/120545219")
                              def testDepthwiseConv2DInputGradFormat(self):
                                if not test.is_gpu_available():
                                  return
                            
                            
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 911..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 125.

                            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

                              @test_util.run_v1_only("b/120545219")
                              def testDepthwiseConv2DFilterGradFormat(self):
                                if not test.is_gpu_available():
                                  return
                            
                            
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 798..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 125.

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DFilterGradExplicitCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTestExplicit()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 989..1007
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1010..1027
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1069..1086
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1131..1149
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1152..1171

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

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DForwardCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTest()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 989..1007
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1010..1027
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1069..1086
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1089..1106
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1152..1171

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

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DInputGradExplicitCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTestExplicit()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 989..1007
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1069..1086
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1089..1106
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1131..1149
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1152..1171

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

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DForwardExplicitCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTestExplicit()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 989..1007
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1010..1027
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1069..1086
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1089..1106
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1131..1149

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

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DFilterGradCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTest()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 989..1007
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1010..1027
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1089..1106
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1131..1149
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1152..1171

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

                            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

                              @test_util.run_gpu_only
                              def testDepthwiseConv2DInputGradCompare(self):
                                for index, (input_size, filter_size, output_size, stride, padding,
                                            dilations) in enumerate(ConfigsToTest()):
                                  if dilations:
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1010..1027
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1069..1086
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1089..1106
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1131..1149
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1152..1171

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

                            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

                                  if data_format == "NCHW":
                                    # Transpose from NHWC input to NCHW
                                    # Ex. [4, 5, 5, 48] to [4, 48, 5, 5]
                                    t1 = array_ops.transpose(t1, [0, 3, 1, 2])
                                    strides = [1, 1, stride, stride]
                            tensorflow/python/kernel_tests/nn_ops/conv_ops_test.py on lines 3341..3345

                            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 2 locations. Consider refactoring.
                            Open

                                with self.cached_session(use_gpu=use_gpu) as sess:
                                  t1 = constant_op.constant(x1, shape=tensor_in_sizes)
                                  t1.set_shape(tensor_in_sizes)
                                  t2 = constant_op.constant(x2, shape=filter_in_sizes)
                                  conv = nn_ops.depthwise_conv2d_native(
                            tensorflow/python/kernel_tests/nn_ops/conv_ops_test.py on lines 3227..3233

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

                            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

                                  Config([2, 5, 8, 1], [3, 4, 1, 2], [2, 5, 10, 2],
                                         padding=[[3, 1], [2, 3]],
                                         dilations=[2, 1]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 205..207

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

                            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

                                  Config([5, 29, 31, 1], [5, 4, 1, 2], [5, 26, 23, 2],
                                         padding=[[3, 2], [1, 0]],
                                         dilations=[2, 3]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 285..287

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

                            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

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

                                  if isinstance(padding, list):
                                    padding = [(0, 0)] + padding + [(0, 0)]
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 339..340
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 970..971
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1113..1114

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

                            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

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

                                if isinstance(padding, list):
                                  padding = [(0, 0)] + padding + [(0, 0)]
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 339..340
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 679..680
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1113..1114

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

                            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

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

                                if isinstance(padding, list):
                                  padding = [(0, 0)] + padding + [(0, 0)]
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 679..680
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 970..971
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 1113..1114

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

                            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

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

                                if isinstance(padding, list):
                                  padding = [(0, 0)] + padding + [(0, 0)]
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 339..340
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 679..680
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 970..971

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

                            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

                                  Config([3, 299, 299, 3], [3, 2, 3, 8], [3, 150, 153, 24],
                                         2,
                                         padding=[[1, 2], [3, 5]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 202..204
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 275..277
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 282..284

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

                            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

                                  Config([2, 15, 16, 1], [3, 3, 1, 2], [2, 5, 8, 2],
                                         3,
                                         padding=[[0, 0], [10, 0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 199..201
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 202..204
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 275..277

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

                            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

                                  Config([4, 5, 5, 1], [2, 2, 1, 2], [4, 4, 5, 2],
                                         2,
                                         padding=[[3, 1], [5, 0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 199..201
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 202..204
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 282..284

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

                            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

                                  Config([5, 183, 183, 1], [5, 5, 1, 2], [5, 62, 60, 2],
                                         3,
                                         padding=[[3, 2], [1, 0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 199..201
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 275..277
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 282..284

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

                            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

                                self._VerifyHandValues(
                                    tensor_in_sizes=[1, 2, 3, 2],
                                    filter_in_sizes=[2, 2, 2, 2],
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py and 1 other location - About 50 mins to fix
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 619..621

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

                            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

                                self._VerifyHandValues(
                                    tensor_in_sizes=[1, 2, 3, 2],
                                    filter_in_sizes=[2, 2, 2, 2],
                            Severity: Minor
                            Found in tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py and 1 other location - About 50 mins to fix
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 627..629

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([2, 5, 8, 1], [4, 4, 1, 2], [2, 3, 10, 2],
                                         padding=[[0, 1], [2, 3]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([4, 9, 27, 8], [3, 3, 8, 1], [4, 14, 31, 8],
                                         padding=[[3, 4], [4, 2]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([1, 15, 15, 2], [1, 3, 2, 1], [1, 18, 23, 2],
                                         padding=[[3, 0], [2, 8]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([2, 4, 3, 2], [3, 2, 2, 1], [2, 4, 3, 2], padding=[[2, 0], [1,
                                                                                                     0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([4, 5, 5, 48], [1, 1, 48, 2], [4, 8, 12, 96],
                                         padding=[[1, 2], [3, 4]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([2, 4, 3, 2], [3, 2, 2, 1], [2, 4, 3, 2], padding=[[2, 0], [1,
                                                                                                     0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([2, 4, 4, 2], [3, 1, 2, 2], [2, 7, 11, 4],
                                         padding=[[4, 1], [3, 4]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([4, 5, 5, 48], [3, 3, 48, 1], [4, 5, 5, 48],
                                         padding=[[0, 2], [0, 2]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([4, 31, 31, 7], [3, 3, 7, 1], [4, 29, 29, 7],
                                         padding=[[0, 0], [0, 0]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([1, 8, 7, 2], [8, 7, 2, 1], [1, 8, 7, 2], padding=[[0, 7], [3,
                                                                                                     3]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 193..194
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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 11 locations. Consider refactoring.
                            Open

                                  Config([4, 1, 1, 3], [3, 3, 3, 2], [4, 29, 39, 6],
                                         padding=[[10, 20], [15, 25]]),
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 191..192
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 195..196
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 197..198
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 210..211
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 212..213
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 214..215
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 273..274
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 278..279
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 280..281
                            tensorflow/python/kernel_tests/nn_ops/depthwise_conv_op_base.py on lines 290..291

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

                            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