tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

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

  anno['2d_bbox_left'] = np.array([float(x[4]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 14 locations. Consider refactoring.
Open

  anno['3d_bbox_y'] = np.array([float(x[12]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 14 locations. Consider refactoring.
Open

  anno['2d_bbox_bottom'] = np.array([float(x[7]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 10 locations. Consider refactoring.
Open

    if self._norm_first:
      layer_output = source_attention_output + layer_output
    else:
      layer_output = self._output_layer_norm(layer_output + attention_output)
Severity: Major
Found in official/nlp/modeling/layers/tn_transformer_expand_condense.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/reuse_transformer.py on lines 338..341
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 235..238
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 402..405
official/projects/detr/modeling/transformer.py on lines 814..818
official/projects/detr/modeling/transformer.py on lines 830..834
official/projects/detr/modeling/transformer.py on lines 845..848

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

  anno['truncated'] = np.array([float(x[1]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 14 locations. Consider refactoring.
Open

  anno['3d_bbox_x'] = np.array([float(x[11]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 14 locations. Consider refactoring.
Open

  anno['3d_bbox_rot_y'] = np.array([float(x[14]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295

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

  anno['3d_bbox_z'] = np.array([float(x[13]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 283..283
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 10 locations. Consider refactoring.
Open

    if self._norm_first:
      attention_output = source_tensor + attention_output
    else:
      attention_output = self._attention_layer_norm(target_tensor +
Severity: Major
Found in official/nlp/modeling/layers/reuse_transformer.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 235..238
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 250..253
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 402..405
official/projects/detr/modeling/transformer.py on lines 814..818
official/projects/detr/modeling/transformer.py on lines 830..834
official/projects/detr/modeling/transformer.py on lines 845..848

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

      inputs = tf.cast(tf.random_uniform(
          inputs_shape, minval=0, maxval=255, dtype=tf.int32), dtype=tf.float32)
research/object_detection/builders/image_resizer_builder_test.py on lines 32..34
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 461..463
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 502..504
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2091..2092
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2115..2116
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2136..2138
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2167..2169
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 622..624
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 642..644

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

      inputs2 = tf.cast(tf.random_uniform(
          inputs_shape2, minval=0, maxval=255, dtype=tf.int32),
                        dtype=tf.float32)
research/object_detection/builders/image_resizer_builder_test.py on lines 32..34
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 461..463
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 502..504
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2091..2092
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2115..2116
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2167..2169
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 601..602
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 622..624
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 642..644

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

    if self._norm_first:
      attention_output = source_tensor + attention_output
    else:
      attention_output = self._attention_layer_norm(target_tensor +
Severity: Major
Found in official/nlp/modeling/layers/tn_transformer_expand_condense.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/reuse_transformer.py on lines 338..341
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 250..253
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 402..405
official/projects/detr/modeling/transformer.py on lines 814..818
official/projects/detr/modeling/transformer.py on lines 830..834
official/projects/detr/modeling/transformer.py on lines 845..848

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

  anno['alpha'] = np.array([float(x[3]) for x in content])
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 281..281
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 282..282
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 285..285
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 286..286
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 287..287
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 288..288
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 290..290
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 291..291
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 292..292
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 293..293
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 294..294
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 295..295
research/object_detection/dataset_tools/create_kitti_tf_record.py on lines 296..296

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 10 locations. Consider refactoring.
Open

      images = tf.cast(
          tf.random_uniform(input_shape, minval=0, maxval=255, dtype=tf.int32),
          dtype=tf.float32)
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 461..463
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 502..504
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2091..2092
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2115..2116
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2136..2138
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2167..2169
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 601..602
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 622..624
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 642..644

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

    if self._norm_first:
      layer_output = source_attention_output + layer_output
    else:
      layer_output = self.output_layer_norm(layer_output + attention_output)
Severity: Major
Found in official/projects/detr/modeling/transformer.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/reuse_transformer.py on lines 338..341
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 235..238
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 250..253
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 402..405
official/projects/detr/modeling/transformer.py on lines 814..818
official/projects/detr/modeling/transformer.py on lines 830..834

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 10 locations. Consider refactoring.
Open

    if self._norm_first:
      self_attention_output = source_tensor + self_attention_output
    else:
      self_attention_output = self.self_attention_layer_norm(
          input_tensor + self_attention_output)
Severity: Major
Found in official/projects/detr/modeling/transformer.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/reuse_transformer.py on lines 338..341
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 235..238
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 250..253
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 402..405
official/projects/detr/modeling/transformer.py on lines 830..834
official/projects/detr/modeling/transformer.py on lines 845..848

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

      inputs = tf.cast(
          tf.random_uniform(inputs_shape, minval=0, maxval=255, dtype=tf.int32),
          dtype=tf.float32)
research/object_detection/builders/image_resizer_builder_test.py on lines 32..34
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 461..463
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2091..2092
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2115..2116
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2136..2138
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2167..2169
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 601..602
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 622..624
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 642..644

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

      inputs = tf.cast(tf.random_uniform(
          inputs_shape, minval=0, maxval=255, dtype=tf.int32), dtype=tf.float32)
research/object_detection/builders/image_resizer_builder_test.py on lines 32..34
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 461..463
research/object_detection/meta_architectures/context_rcnn_meta_arch_test.py on lines 502..504
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2091..2092
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2136..2138
research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 2167..2169
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 601..602
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 622..624
research/object_detection/meta_architectures/ssd_meta_arch_test.py on lines 642..644

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

    if self._norm_first:
      attention_output = source_tensor + attention_output
    else:
      attention_output = self._attention_layer_norm(target_tensor +
Severity: Major
Found in official/projects/detr/modeling/transformer.py and 9 other locations - About 45 mins to fix
official/nlp/modeling/layers/reuse_transformer.py on lines 338..341
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 235..238
official/nlp/modeling/layers/tn_transformer_expand_condense.py on lines 250..253
official/nlp/modeling/layers/transformer.py on lines 419..423
official/nlp/modeling/layers/transformer.py on lines 438..442
official/nlp/modeling/layers/transformer.py on lines 453..456
official/projects/detr/modeling/transformer.py on lines 814..818
official/projects/detr/modeling/transformer.py on lines 830..834
official/projects/detr/modeling/transformer.py on lines 845..848

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language