tensorflow/models

View on GitHub
research/object_detection/models/ssd_spaghettinet_feature_extractor.py

Summary

Maintainability
F
2 wks
Test Coverage

File ssd_spaghettinet_feature_extractor.py has 833 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""SpaghettiNet Feature Extractor."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

Severity: Major
Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 2 days to fix

    Function _spaghetti_node has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

      def _spaghetti_node(self, node, scope):
        """Spaghetti node."""
        node_spec = self._node_specs.nodes[node]
    
        # Make spaghetti edges

    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 __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def __init__(

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

        def _quantizable_concat(self,

        Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def __init__(self,
        Severity: Major
        Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 50 mins to fix

          Function _ibn_fused_grouped has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def _ibn_fused_grouped(self, net, num_filters, expansion_rates, kernel_size,
          Severity: Major
          Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 50 mins to fix

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

              def _expanded_conv(self, net, num_filters, expansion_rates, kernel_size,
            Severity: Minor
            Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 45 mins to fix

              Function _sep_conv has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def _sep_conv(self, net, num_filters, kernel_size, stride, scope):
              Severity: Minor
              Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 35 mins to fix

                Function _ibn_fused_grouped has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                  def _ibn_fused_grouped(self, net, num_filters, expansion_rates, kernel_size,
                                         stride, groups, scope):
                    """Fused grouped IBN convolution."""
                    add_fixed_padding = self._use_explicit_padding and stride > 1
                    padding = 'VALID' if add_fixed_padding else 'SAME'
                Severity: Minor
                Found in research/object_detection/models/ssd_spaghettinet_feature_extractor.py - About 35 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 7 locations. Consider refactoring.
                Open

                  nodes['c0n1'] = SpaghettiNode(
                      num_filters=120,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

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

                  nodes['c0n0'] = SpaghettiNode(
                      num_filters=160,
                      level=5,
                      layers=[
                          IbnOp(3, 8, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

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

                  nodes['c0n2'] = SpaghettiNode(
                      num_filters=168,
                      level=5,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735

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

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

                  nodes['c0n1'] = SpaghettiNode(
                      num_filters=120,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

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

                  nodes['c0n0'] = SpaghettiNode(
                      num_filters=144,
                      level=5,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

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

                  nodes['c0n1'] = SpaghettiNode(
                      num_filters=120,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 579..590
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

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

                  nodes['c0n0'] = SpaghettiNode(
                      num_filters=152,
                      level=5,
                      layers=[
                          IbnOp(3, 8, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 450..461
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 463..474
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 592..603
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 711..722
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 724..735
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 737..748

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

                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

                  nodes['n1'] = SpaghettiNode(
                      num_filters=64,
                      level=3,
                      layers=[
                          IbnFusedGrouped(3, 8, 2, 4, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 663..672

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

                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

                  nodes['n1'] = SpaghettiNode(
                      num_filters=64,
                      level=3,
                      layers=[
                          IbnFusedGrouped(3, 8, 2, 4, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 531..540

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

                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

                  nodes['n2'] = SpaghettiNode(
                      num_filters=72,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 412..421

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

                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

                  nodes['n2'] = SpaghettiNode(
                      num_filters=72,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 541..550

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

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

                  nodes['n2'] = SpaghettiNode(
                      num_filters=80,
                      level=4,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 422..431
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 551..560
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 683..692
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 693..702

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

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

                  nodes['n3'] = SpaghettiNode(
                      num_filters=104,
                      level=5,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 422..431
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 551..560
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 673..682
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 693..702

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

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

                  nodes['n4'] = SpaghettiNode(
                      num_filters=88,
                      level=6,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 422..431
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 551..560
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 673..682
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 683..692

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

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

                  nodes['n3'] = SpaghettiNode(
                      num_filters=88,
                      level=5,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 551..560
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 673..682
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 683..692
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 693..702

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

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

                  nodes['n3'] = SpaghettiNode(
                      num_filters=96,
                      level=5,
                      layers=[
                          IbnOp(3, 8, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 422..431
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 673..682
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 683..692
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 693..702

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

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

                  nodes['c0n4'] = SpaghettiNode(
                      num_filters=136,
                      level=7,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 486..495
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 605..614

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

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

                  nodes['c0n3'] = SpaghettiNode(
                      num_filters=136,
                      level=6,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 605..614
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 628..637

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

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

                  nodes['c0n2'] = SpaghettiNode(
                      num_filters=168,
                      level=5,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 486..495
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 628..637

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

                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 tf.name_scope(scope + '/nearest_neighbor_upsampling'):
                        input_shape = shape_utils.combined_static_and_dynamic_shape(node_pre_up)
                        node_up = tf.image.resize_nearest_neighbor(
                            node_pre_up,
                            [input_shape[1] * upsample_ratio, input_shape[2] * upsample_ratio])
                research/object_detection/models/ssd_mobilenet_v2_mnasfpn_feature_extractor.py on lines 94..97

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

                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

                  nodes['c0n4'] = SpaghettiNode(
                      num_filters=136,
                      level=7,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 476..484

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

                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

                  nodes['c0n2'] = SpaghettiNode(
                      num_filters=168,
                      level=5,
                      layers=[
                          IbnOp(3, 4, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 497..505

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

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

                  nodes['n5'] = SpaghettiNode(
                      num_filters=88,
                      level=7,
                      layers=[
                          SepConvOp(5, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 507..514
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 571..578
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 639..646
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 773..780

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

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

                  nodes['n5'] = SpaghettiNode(
                      num_filters=56,
                      level=7,
                      layers=[
                          SepConvOp(5, 2, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 442..449
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 507..514
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 639..646
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 773..780

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

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

                  nodes['c0n5'] = SpaghettiNode(
                      num_filters=64,
                      level=8,
                      layers=[
                          SepConvOp(3, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 442..449
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 507..514
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 571..578
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 773..780

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

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

                  nodes['c0n5'] = SpaghettiNode(
                      num_filters=64,
                      level=8,
                      layers=[
                          SepConvOp(5, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 442..449
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 507..514
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 571..578
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 639..646

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

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

                  nodes['c0n5'] = SpaghettiNode(
                      num_filters=64,
                      level=8,
                      layers=[
                          SepConvOp(3, 1, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 442..449
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 571..578
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 639..646
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 773..780

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

                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

                  nodes['n0'] = SpaghettiNode(
                      num_filters=48,
                      level=2,
                      layers=[
                          IbnFusedGrouped(3, 8, 2, 3, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 524..530
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 656..662

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

                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

                  nodes['n0'] = SpaghettiNode(
                      num_filters=48,
                      level=2,
                      layers=[
                          IbnFusedGrouped(3, 8, 2, 3, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 396..402
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 656..662

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

                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

                  nodes['n0'] = SpaghettiNode(
                      num_filters=48,
                      level=2,
                      layers=[
                          IbnFusedGrouped(3, 8, 2, 3, False),
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 396..402
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 524..530

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

                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 curr_spec.level < prev_spec.level:
                      # upsample
                      output = self._upsample(self._nodes[prev_node], curr_spec.num_filters,
                                              2**(prev_spec.level - curr_spec.level), scope)
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 354..357

                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

                    elif curr_spec.level > prev_spec.level:
                      # downsample
                      output = self._downsample(self._nodes[prev_node], curr_spec.num_filters,
                                                2**(curr_spec.level - prev_spec.level), scope)
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 350..353

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

                    net = slim.conv2d(
                        net,
                        num_filters, [1, 1],
                        activation_fn=tf.identity,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 134..140
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 210..216
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 232..238
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 273..279

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

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

                    net = slim.conv2d(
                        net,
                        num_filters, [1, 1],
                        activation_fn=tf.identity,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 134..140
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 150..156
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 232..238
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 273..279

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

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

                    node_after_down = slim.conv2d(
                        node_down,
                        num_filters, [1, 1],
                        activation_fn=tf.identity,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 134..140
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 150..156
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 210..216
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 232..238

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

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

                    net = slim.conv2d(
                        net,
                        expanded_num_filters, [1, 1],
                        activation_fn=self._activation_fn,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 150..156
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 210..216
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 232..238
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 273..279

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

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

                    net = slim.conv2d(
                        net,
                        num_filters, [1, 1],
                        activation_fn=self._activation_fn,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 134..140
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 150..156
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 210..216
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 273..279

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

                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 slim.arg_scope([slim.separable_conv2d],
                                            weights_initializer=tf.truncated_normal_initializer(
                                                mean=0.0, stddev=0.03),
                                            weights_regularizer=slim.l2_regularizer(1e-5)):
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 874..877

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

                      with slim.arg_scope([slim.conv2d],
                                          weights_initializer=tf.truncated_normal_initializer(
                                              mean=0.0, stddev=0.03),
                                          weights_regularizer=slim.l2_regularizer(1e-5)):
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 878..881

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

                    node_pre_up = slim.conv2d(
                        net,
                        num_filters, [1, 1],
                        activation_fn=tf.identity,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 283..289

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

                    return slim.conv2d(
                        net,
                        num_filters, [1, 1],
                        activation_fn=tf.identity,
                        normalizer_fn=self._normalization_fn,
                research/object_detection/models/ssd_spaghettinet_feature_extractor.py on lines 243..249

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

                  def _quant_var(self,
                                 name,
                                 initializer_val,
                                 vars_collection=tf.GraphKeys.MOVING_AVERAGE_VARIABLES):
                    """Create an var for storing the min/max quantization range."""
                research/lstm_object_detection/lstm/utils.py on lines 27..37

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

                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

                      net = edge_outputs[0][:, :edge_output_shape[1], :edge_output_shape[2], :]
                research/object_detection/models/feature_map_generators.py on lines 594..594

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

                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