official/vision/modeling/layers/nn_blocks_test.py
File nn_blocks_test.py
has 841 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2024 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Function test_universalinvertedbottleneck_block_layer_scale_creation
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_universalinvertedbottleneck_block_layer_scale_creation(
Function test_multi_query_attention_with_downsampling
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_multi_query_attention_with_downsampling(
Function test_multi_head_self_attention
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_multi_head_self_attention(
Function test_layer_with_feedforward_cls_restoration_from_config
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_layer_with_feedforward_cls_restoration_from_config(self):
sequence_length = 21
width = 80
call_list = []
Function test_universalinvertedbottleneck_block_creation
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_universalinvertedbottleneck_block_creation(
Function test_multi_query_attention_v1
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_multi_query_attention_v1(
Function test_multi_query_attention_v2
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_multi_query_attention_v2(
Function test_bottleneck_block_creation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_bottleneck_block_creation(self, block_fn, strides, use_projection,
Function test_residual_block_creation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_residual_block_creation(self, block_fn, strides, use_projection,
Function test_invertedbottleneck_block_creation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def test_invertedbottleneck_block_creation(self, block_fn, expand_ratio,