tensorflow/models

View on GitHub
research/deeplab/core/xception.py

Summary

Maintainability
F
1 wk
Test Coverage

File xception.py has 830 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Lint as: python2, python3
# Copyright 2018 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.
Severity: Major
Found in research/deeplab/core/xception.py - About 1 day to fix

    Function xception_module has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    def xception_module(inputs,
                        depth_list,
                        skip_connection_type,
                        stride,
                        kernel_size=3,
    Severity: Minor
    Found in research/deeplab/core/xception.py - About 4 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 xception_module has 15 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def xception_module(inputs,
    Severity: Major
    Found in research/deeplab/core/xception.py - About 1 hr to fix

      Function xception_71_factory has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def xception_71_factory(inputs,
      Severity: Major
      Found in research/deeplab/core/xception.py - About 1 hr to fix

        Function xception_65_factory has 14 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def xception_65_factory(inputs,
        Severity: Major
        Found in research/deeplab/core/xception.py - About 1 hr to fix

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

          def stack_blocks_dense(net,
                                 blocks,
                                 output_stride=None,
                                 outputs_collections=None):
            """Stacks Xception blocks and controls output feature density.
          Severity: Minor
          Found in research/deeplab/core/xception.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 xception_block has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def xception_block(scope,
          Severity: Major
          Found in research/deeplab/core/xception.py - About 1 hr to fix

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

            def xception_41(inputs,
            Severity: Major
            Found in research/deeplab/core/xception.py - About 1 hr to fix

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

              def xception_71(inputs,
              Severity: Major
              Found in research/deeplab/core/xception.py - About 1 hr to fix

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

                def xception_65(inputs,
                Severity: Major
                Found in research/deeplab/core/xception.py - About 1 hr to fix

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

                  def separable_conv2d_same(inputs,
                  Severity: Major
                  Found in research/deeplab/core/xception.py - About 1 hr to fix

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

                    def xception(inputs,
                    Severity: Major
                    Found in research/deeplab/core/xception.py - About 1 hr to fix

                      Function xception_arg_scope has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def xception_arg_scope(weight_decay=0.00004,
                      Severity: Major
                      Found in research/deeplab/core/xception.py - About 1 hr to fix

                        Function _separable_conv has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _separable_conv(features, depth, kernel_size, depth_multiplier,
                        Severity: Major
                        Found in research/deeplab/core/xception.py - About 1 hr to fix

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

                          def separable_conv2d_same(inputs,
                                                    num_outputs,
                                                    kernel_size,
                                                    depth_multiplier,
                                                    stride,
                          Severity: Minor
                          Found in research/deeplab/core/xception.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

                          Avoid deeply nested control flow statements.
                          Open

                                    if output_stride is not None and current_stride == output_stride:
                                      net = block.unit_fn(net, rate=rate, **dict(unit, stride=1))
                                      rate *= unit.get('stride', 1)
                                    else:
                                      net = block.unit_fn(net, rate=1, **unit)
                          Severity: Major
                          Found in research/deeplab/core/xception.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                      with slim.arg_scope(
                                          [xception_module],
                                          use_bounded_activation=use_bounded_activation,
                                          use_explicit_padding=not use_bounded_activation) as arg_sc:
                                        return arg_sc
                            Severity: Major
                            Found in research/deeplab/core/xception.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                        if output_stride % 2 != 0:
                                          raise ValueError('The output_stride needs to be a multiple of 2.')
                                        output_stride //= 2
                              Severity: Major
                              Found in research/deeplab/core/xception.py - About 45 mins to fix

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

                                def fixed_padding(inputs, kernel_size, rate=1):
                                  """Pads the input along the spatial dimensions independently of input size.
                                
                                  Args:
                                    inputs: A tensor of size [batch, height_in, width_in, channels].
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 2 other locations - About 6 hrs to fix
                                research/object_detection/models/keras_models/resnet_v1.py on lines 33..55
                                research/object_detection/utils/ops.py on lines 138..157

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

                                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

                                def xception_71(inputs,
                                                num_classes=None,
                                                is_training=True,
                                                global_pool=True,
                                                keep_prob=0.5,
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 4 hrs to fix
                                research/deeplab/core/xception.py on lines 719..731

                                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

                                def xception_65(inputs,
                                                num_classes=None,
                                                is_training=True,
                                                global_pool=True,
                                                keep_prob=0.5,
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 4 hrs to fix
                                research/deeplab/core/xception.py on lines 857..869

                                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

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

                                      xception_block('exit_flow/block2',
                                                     depth_list=[1536, 1536, 2048],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/deeplab/core/xception.py on lines 695..696

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

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

                                      xception_block('exit_flow/block2',
                                                     depth_list=[1536, 1536, 2048],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/deeplab/core/xception.py on lines 833..834

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

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

                                          if output_stride is not None and current_stride == output_stride:
                                            net = block.unit_fn(net, rate=rate, **dict(unit, stride=1))
                                            rate *= unit.get('stride', 1)
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/slim/nets/resnet_utils.py on lines 194..196

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

                                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 output_stride is not None:
                                          if output_stride % 2 != 0:
                                            raise ValueError('The output_stride needs to be a multiple of 2.')
                                          output_stride //= 2
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/deeplab/core/resnet_v1_beta.py on lines 254..257

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

                                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 use_bounded_activation:
                                        residual = tf.clip_by_value(residual, -_CLIP_CAP, _CLIP_CAP)
                                        shortcut = tf.clip_by_value(shortcut, -_CLIP_CAP, _CLIP_CAP)
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/deeplab/core/xception.py on lines 331..333

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

                                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 use_bounded_activation:
                                        residual = tf.clip_by_value(residual, -_CLIP_CAP, _CLIP_CAP)
                                        inputs = tf.clip_by_value(inputs, -_CLIP_CAP, _CLIP_CAP)
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 1 other location - About 1 hr to fix
                                research/deeplab/core/xception.py on lines 324..326

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

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

                                      xception_block('entry_flow/block2',
                                                     depth_list=[256, 256, 256],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block5',
                                                     depth_list=[728, 728, 728],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block3',
                                                     depth_list=[728, 728, 728],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('middle_flow/block1',
                                                     depth_list=[728, 728, 728],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('exit_flow/block1',
                                                     depth_list=[728, 1024, 1024],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('exit_flow/block1',
                                                     depth_list=[728, 1024, 1024],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814

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

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

                                      xception_block('entry_flow/block3',
                                                     depth_list=[256, 256, 256],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block2',
                                                     depth_list=[256, 256, 256],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block1',
                                                     depth_list=[128, 128, 128],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block1',
                                                     depth_list=[128, 128, 128],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('middle_flow/block1',
                                                     depth_list=[728, 728, 728],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 793..794
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                      xception_block('entry_flow/block4',
                                                     depth_list=[728, 728, 728],
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 11 other locations - About 55 mins to fix
                                research/deeplab/core/xception.py on lines 645..646
                                research/deeplab/core/xception.py on lines 655..656
                                research/deeplab/core/xception.py on lines 665..666
                                research/deeplab/core/xception.py on lines 675..676
                                research/deeplab/core/xception.py on lines 685..686
                                research/deeplab/core/xception.py on lines 763..764
                                research/deeplab/core/xception.py on lines 773..774
                                research/deeplab/core/xception.py on lines 783..784
                                research/deeplab/core/xception.py on lines 803..804
                                research/deeplab/core/xception.py on lines 813..814
                                research/deeplab/core/xception.py on lines 823..824

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

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

                                  return xception(inputs,
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 2 other locations - About 45 mins to fix
                                research/deeplab/core/xception.py on lines 617..617
                                research/deeplab/core/xception.py on lines 845..845

                                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

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

                                  return xception(inputs,
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 2 other locations - About 45 mins to fix
                                research/deeplab/core/xception.py on lines 707..707
                                research/deeplab/core/xception.py on lines 845..845

                                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

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

                                  return xception(inputs,
                                Severity: Major
                                Found in research/deeplab/core/xception.py and 2 other locations - About 45 mins to fix
                                research/deeplab/core/xception.py on lines 617..617
                                research/deeplab/core/xception.py on lines 707..707

                                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