class_docstr: Simple full-connected layer neural network composed of a sequence of linear layers with PReLU activation and
  dropout.  The network accepts input with `in_channels` channels, has output with `out_channels` channels, and
  hidden layer output channels given in `hidden_channels`. If `bias` is True then linear units have a bias term.
  
  Args:
      in_channels: number of input channels.
      out_channels: number of output channels.
      hidden_channels: number of output channels for each hidden layer.
      dropout: dropout ratio. Defaults to no dropout.
      act: activation type and arguments. Defaults to PReLU.
      bias: whether to have a bias term in linear units. Defaults to True.
      adn_ordering: order of operations in :py:class:`monai.networks.blocks.ADN`.
  
  Examples::
  
      # accepts 4 values and infers 3 values as output, has 3 hidden layers with 10, 20, 10 values as output
      net = FullyConnectedNet(4, 3, [10, 20, 10], dropout=0.2)
class_docstr_tok: ["Simple","full-connected","layer","neural","network","composed","of","a","sequence","of","linear","layers","with","PReLU","activation","and","dropout",".","The","network","accepts","input","with","`","in_channels","`","channels",",","has","output","with","`","out_channels","`","channels",",","and","hidden","layer","output","channels","given","in","`","hidden_channels","`",".","If","`","bias","`","is","True","then","linear","units","have","a","bias","term",".","Args",":","in_channels",":","number","of","input","channels",".","out_channels",":","number","of","output","channels",".","hidden_channels",":","number","of","output","channels","for","each","hidden","layer",".","dropout",":","dropout","ratio",".","Defaults","to","no","dropout",".","act",":","activation","type","and","arguments",".","Defaults","to","PReLU",".","bias",":","whether","to","have","a","bias","term","in","linear","units",".","Defaults","to","True",".","adn_ordering",":","order","of","operations","in",":","py",":","class",":","`","monai.networks.blocks.ADN","`",".","Examples",":",":","#","accepts","4","values","and","infers","3","values","as","output",",","has","3","hidden","layers","with","10",",","20",",","10","values","as","output","net","=","FullyConnectedNet","(","4",",","3",",","[","10",",","20",",","10","]",",","dropout=0.2",")"]
docstr: Defines a network accept input with `in_channels` channels, output of `out_channels` channels, and hidden layers
  with channels given in `hidden_channels`. If `bias` is True then linear units have a bias term.
docstr_tok: ["Defines","a","network","accept","input","with","`","in_channels","`","channels",",","output","of","`","out_channels","`","channels",",","and","hidden","layers","with","channels","given","in","`","hidden_channels","`",".","If","`","bias","`","is","True","then","linear","units","have","a","bias","term","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      hidden_channels: Sequence[int],
      dropout: tuple | str | float | None = None,
      act: tuple | str | None = Act.PRELU,
      bias: bool = True,
      adn_ordering: str | None = None,
  ) -> None:
      """
      Defines a network accept input with `in_channels` channels, output of `out_channels` channels, and hidden layers
      with channels given in `hidden_channels`. If `bias` is True then linear units have a bias term.
      """
      super().__init__()
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.hidden_channels = list(hidden_channels)
      self.act = act
      self.dropout = dropout
      self.adn_ordering = adn_ordering
  
      self.add_module("flatten", nn.Flatten())
  
      prev_channels = self.in_channels
      for i, c in enumerate(hidden_channels):
          self.add_module(
              "hidden_%i" % i, self._get_layer(prev_channels, c, bias)
          )
          prev_channels = c
  
      self.add_module(
          "output", nn.Linear(prev_channels, out_channels, bias)
      )
  
file_path: MONAI/monai/networks/nets/fullyconnectednet.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  import torch.nn
  from monai.networks.blocks import ADN
  from monai.networks.layers.factories import Act
label_desc: Use image node_id 1 to create a new FullyConnectedNet object from inherited base classes: nn with example: obj = FullyConnectedNet(in_channels, out_channels, hidden_channels, dropout, act, bias, adn_ordering)