class_docstr: The fixed version of NAS-Bench-101 Cell, used in python-version execution engine.
class_docstr_tok: ["The","fixed","version","of","NAS-Bench-101","Cell",",","used","in","python-version","execution","engine","."]
code: def forward(self, inputs):
      tensors = [inputs]
      for t in range(1, self.num_nodes - 1):
          # Create interior connections, truncating if necessary
          add_in = [
              truncate(tensors[src], self.hidden_features[t])
              for src in range(1, t)
              if self.connection_matrix[src, t]
          ]
  
          # Create add connection from projected input
          if self.connection_matrix[0, t]:
              add_in.append(self.projections[t](tensors[0]))
  
          if len(add_in) == 1:
              vertex_input = add_in[0]
          else:
              vertex_input = sum(add_in)
  
          # Perform op at vertex t
          vertex_out = self.ops[t](vertex_input)
          tensors.append(vertex_out)
  
      # Construct final output tensor by concating all fan-in and adding input.
      if np.sum(self.connection_matrix[:, -1]) == 1:
          src = np.where(self.connection_matrix[:, -1] == 1)[0][0]
          return (
              self.projections[-1](tensors[0])
              if src == 0
              else tensors[src]
          )
  
      outputs = torch.cat(
          [
              tensors[src]
              for src in range(1, self.num_nodes - 1)
              if self.connection_matrix[src, -1]
          ],
          1,
      )
      if self.connection_matrix[0, -1]:
          outputs += self.projections[-1](tensors[0])
      assert outputs.size(1) == self.out_features
      return outputs
  
imports: import logging
  from collections import OrderedDict
  from typing import Callable, List, Optional, Union, Dict, Tuple, Callable, Iterable, Any, cast
  import numpy
  import torch
  import torch.nn
  from nni.mutable import Constraint, Categorical, CategoricalMultiple, Constraint, ConstraintViolation, Mutable, LabeledMutable, Sample, SampleValidationError, auto_label, label_scope
  from nni.mutable.mutable import _mutable_equal
  from nni.nas.nn.pytorch import InputChoice, LayerChoice, MutableModule
label_desc: Use image node_id 3 for calling the _NasBench101CellFixed obj's underlying member method code with example usage: obj.forward(inputs) and returns: outputs, unknown