research/object_detection/meta_architectures/deepmac_meta_arch_test.py
File deepmac_meta_arch_test.py
has 1450 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Tests for google3.third_party.tensorflow_models.object_detection.meta_architectures.deepmac_meta_arch."""
import functools
import math
import random
DeepMACMetaArchTest
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DeepMACMetaArchTest(tf.test.TestCase, parameterized.TestCase):
# TODO(vighneshb): Add batch_size > 1 tests for loss functions.
def setUp(self): # pylint:disable=g-missing-super-call
DeepMACUtilsTest
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DeepMACUtilsTest(tf.test.TestCase, parameterized.TestCase):
def test_proto_parse(self):
proto = center_net_pb2.CenterNet().DeepMACMaskEstimation()
Function test_transform_images_and_boxes
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_transform_images_and_boxes(self):
images = np.zeros((2, 32, 32, 3), dtype=np.float32)
images[:, 14:19, 14:19, :] = 1.0
boxes = tf.constant(
[[[14.0 / 32, 14.0 / 32, 18.0 / 32, 18.0 / 32]] * 2] * 2)
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function test_mask_network
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_mask_network(self, mask_net, mask_net_channels,