tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      64, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      64, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      256, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      256, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      128, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220
official/legacy/image_classification/vgg/vgg_model.py on lines 230..233

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

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

  x = layers.Conv2D(
      512, (3, 3),
      padding='same',
      kernel_regularizer=_gen_l2_regularizer(use_l2_regularizer),
Severity: Major
Found in official/legacy/image_classification/vgg/vgg_model.py and 12 other locations - About 35 mins to fix
official/legacy/image_classification/vgg/vgg_model.py on lines 62..65
official/legacy/image_classification/vgg/vgg_model.py on lines 75..78
official/legacy/image_classification/vgg/vgg_model.py on lines 91..94
official/legacy/image_classification/vgg/vgg_model.py on lines 104..107
official/legacy/image_classification/vgg/vgg_model.py on lines 120..123
official/legacy/image_classification/vgg/vgg_model.py on lines 133..136
official/legacy/image_classification/vgg/vgg_model.py on lines 146..149
official/legacy/image_classification/vgg/vgg_model.py on lines 162..165
official/legacy/image_classification/vgg/vgg_model.py on lines 175..178
official/legacy/image_classification/vgg/vgg_model.py on lines 188..191
official/legacy/image_classification/vgg/vgg_model.py on lines 204..207
official/legacy/image_classification/vgg/vgg_model.py on lines 217..220

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

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

    intended_values = targets * self.mix_frac + old_values * (1 - self.mix_frac)
Severity: Minor
Found in research/pcl_rl/optimizers.py and 2 other locations - About 35 mins to fix
research/pcl_rl/optimizers.py on lines 144..144
research/pcl_rl/optimizers.py on lines 180..180

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

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

        if len(example.features.feature[
            'image/object/bbox/xmin'
            ].float_list.value) < 1:
          example.features.feature[
              'context_features_idx'].int64_list.value.append(
research/object_detection/dataset_tools/context_rcnn/add_context_to_examples.py on lines 458..462
research/object_detection/dataset_tools/context_rcnn/add_context_to_examples.py on lines 464..470

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

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

    if self.clip_adv:
      adv = tf.minimum(self.clip_adv, tf.maximum(-self.clip_adv, adv))
Severity: Minor
Found in research/pcl_rl/objective.py and 2 other locations - About 35 mins to fix
research/pcl_rl/objective.py on lines 150..151
research/pcl_rl/objective.py on lines 329..330

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

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

    if self.clip_adv:
      adv = tf.minimum(self.clip_adv, tf.maximum(-self.clip_adv, adv))
Severity: Minor
Found in research/pcl_rl/objective.py and 2 other locations - About 35 mins to fix
research/pcl_rl/objective.py on lines 150..151
research/pcl_rl/objective.py on lines 256..257

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

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

    hidden_cfg = {
        "num_attention_heads":
            2,
        "intermediate_size":
            3072,
Severity: Minor
Found in official/nlp/modeling/networks/encoder_scaffold_test.py and 2 other locations - About 35 mins to fix
official/nlp/modeling/networks/encoder_scaffold_test.py on lines 102..116
official/nlp/modeling/networks/encoder_scaffold_test.py on lines 610..624

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

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

    masks = [
        tfexample_utils.encode_image(np.uint8(m), fmt='PNG')
        for m in list(mask_content)
official/vision/dataloaders/tf_example_decoder_test.py on lines 111..113
official/vision/dataloaders/tf_example_decoder_test.py on lines 233..235

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

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

        if example.features.feature[
            'image/embedding_score'
            ].float_list.value[0] < self._context_features_score_threshold:
          example.features.feature[
              'context_features_idx'].int64_list.value.append(
research/object_detection/dataset_tools/context_rcnn/add_context_to_examples.py on lines 458..462
research/object_detection/dataset_tools/context_rcnn/add_context_to_examples.py on lines 472..478

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

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

    masks = [
        tfexample_utils.encode_image(np.uint8(m), fmt='PNG')
        for m in list(mask_content)
Severity: Minor
Found in official/vision/dataloaders/tf_example_decoder_test.py and 2 other locations - About 35 mins to fix
official/vision/dataloaders/tf_example_decoder_test.py on lines 111..113
official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 114..116

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

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

    masks = [
        tfexample_utils.encode_image(np.uint8(m), fmt='PNG')
        for m in list(mask_content)
Severity: Minor
Found in official/vision/dataloaders/tf_example_decoder_test.py and 2 other locations - About 35 mins to fix
official/vision/dataloaders/tf_example_decoder_test.py on lines 233..235
official/vision/dataloaders/tf_example_label_map_decoder_test.py on lines 114..116

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

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

Severity
Category
Status
Source
Language