tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

Avoid too many return statements within this function.
Open

    return tf.distribute.experimental.ParameterServerStrategy(cluster_resolver)
Severity: Major
Found in official/common/distribute_utils.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))
    Severity: Major
    Found in official/vision/data/tfrecord_lib.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return tf.distribute.OneDeviceStrategy("device:GPU:0")
      Severity: Major
      Found in official/common/distribute_utils.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return
        Severity: Major
        Found in official/modeling/fast_training/experimental/tf2_utils_2x_wide.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return net, end_points
          Severity: Major
          Found in official/projects/s3d/modeling/inception_utils.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return None
            Severity: Major
            Found in official/projects/mobilebert/tf2_model_checkpoint_converter.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return False, False, True
              Severity: Major
              Found in official/projects/yolo/optimization/sgd_torch.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return tf.nn.relu6(features)
                Severity: Major
                Found in official/projects/edgetpu/vision/modeling/heads/bifpn_head.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return spans
                  Severity: Major
                  Found in official/projects/triviaqa/preprocess.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      return []
                    Severity: Major
                    Found in official/projects/triviaqa/preprocess.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return 1 - tf.reduce_mean(weighted_dice / normalizer)
                      Severity: Major
                      Found in official/projects/volumetric_models/losses/segmentation_losses.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return 1 - tf.reduce_mean(dice)
                        Severity: Major
                        Found in official/projects/volumetric_models/losses/segmentation_losses.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                            return True
                          Severity: Major
                          Found in official/projects/waste_identification_ml/data_generation/utils_test.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return tf.nn.leaky_relu(features)
                            Severity: Major
                            Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return tf.nn.selu(features)
                              Severity: Major
                              Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return tf.nn.relu6(features)
                                Severity: Major
                                Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return features * tf.math.tanh(tf.math.softplus(features))
                                  Severity: Major
                                  Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return (
                                    Severity: Major
                                    Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return tf.nn.elu(features)
                                      Severity: Major
                                      Found in official/projects/maxvit/modeling/common_ops.py - About 30 mins to fix

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

                                            input_specs = tf_keras.layers.InputSpec(
                                                shape=[None, input_size[0], input_size[1], 3])
                                        Severity: Major
                                        Found in official/projects/qat/vision/modeling/factory_test.py and 4 other locations - About 30 mins to fix
                                        official/projects/qat/vision/modeling/factory_test.py on lines 95..96
                                        official/projects/qat/vision/modeling/factory_test.py on lines 184..185
                                        official/projects/qat/vision/modeling/factory_test.py on lines 220..221
                                        official/vision/modeling/backbones/spinenet_test.py on lines 71..72

                                        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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language