code: def fc(self, inp, num_out, name, relu=True):
      with tf.variable_scope(name):
          input_shape = inp.get_shape()
          if input_shape.ndims == 4:
              # The input is spatial. Vectorize it first.
              dim = 1
              for d in input_shape[1:].as_list():
                  dim *= d
              feed_in = tf.reshape(inp, [-1, dim])
          else:
              feed_in, dim = (inp, input_shape[-1].value)
          weights = self.make_var("weights", shape=[dim, num_out])
          biases = self.make_var("biases", [num_out])
          op = tf.nn.relu_layer if relu else tf.nn.xw_plus_b
          fc = op(feed_in, weights, biases, name=name)
          return fc
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import cv2
  import os
  import inspect
label_desc: Use image node_id 12 for calling the Network obj's underlying member method code with example usage: obj.fc(inp, num_out, name, relu) and returns: fc