docstr: Ensure we output suggestions with a flatten block correctly placed.
docstr_tok: ["Ensure","we","output","suggestions","with","a","flatten","block","correctly","placed","."]
code: def test_flatten_output(self, grow):
      """Ensure we output suggestions with a flatten block correctly placed."""
  
      # Make trials s.t. the linear model will output all convolutions.
      architectures = [
          np.repeat(block_builder.BlockType.EMPTY_BLOCK, 4),
          np.repeat(block_builder.BlockType.CONVOLUTION_3X3, 4),
      ]
      losses = [0.1, 0.01]
      blocks_to_use = [block_builder.BlockType.CONVOLUTION_3X3]
  
      # Make sure the model suggestion includes a flatten block,
      # despite raw model output being all convolutional.
      best = _get_suggestion(
          architectures,
          blocks_to_use,
          losses,
          grow=grow,
          pass_flatten=True,
      )
      flattens = [
          b
          for b in best
          if "FLATTEN" in block_builder.BlockType(b).name
      ]
      nflat = len(flattens)
      self.assertGreater(nflat, 0)
  
imports: from absl.testing import parameterized
  import mock
  from model_search import block_builder
  from model_search import hparam
  from model_search.metadata import trial
  from model_search.proto import phoenix_spec_pb2
  from model_search.search import linear_model
  from model_search.search import test_utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 10 for calling the LinearModelTest obj's underlying member method code with example usage: obj.test_flatten_output(grow) without return types