code: def set_input(self, input_names, input_dims):
          
          spec = self.spec
          nn_spec = self.nn_spec
          for idx, dim in enumerate(input_dims):
              if len(dim) == 3:
                  input_shape = (dim[0], dim[1], dim[2])
              elif len(dim) == 2:
                  input_shape = (dim[1], )
              elif len(dim) == 1:
                  input_shape = tuple(dim)
              else:
                  raise RuntimeError("Attempting to add a neural network " +
                          "input with rank " + str(len(dim)) +
                          ". All networks should take inputs of rank 1 or 3.")
  
              spec.description.input[idx].type.multiArrayType.ClearField("shape")
              spec.description.input[idx].type.multiArrayType.shape.extend(input_shape)
  
              # TODO: if it's an embedding, this should be integer
              spec.description.input[idx].type.multiArrayType.dataType = _Model_pb2.ArrayFeatureType.DOUBLE
docs: Set the inputs of the network spec.
  
          Parameters
          ----------
          input_names: [str]
              List of input names of the network.
  
          input_dims: [tuple]
              List of input dimensions of the network. The ordering of input_dims
              is the same as input_names.
  
          Examples
          --------
          .. sourcecode:: python
  
              # Set the neural network spec inputs to be 3 dimensional vector data1 and
              # 4 dimensional vector data2.
              >>> builder.set_input(input_names = ['data1', 'data2'], [(3,), (4,)])
  
          See Also
          --------
          set_output, set_class_labels