code: def test_linear_ones(backend_default, basic_linargs, deltas_buffer):
      # basic sanity check with all ones on the inputs
      # and weights, check that each row in output
      # is the sum of the weights for that output
      # this check will confirm that the correct number
      # of operations is being run
      nin, nout, batch_size = basic_linargs
      NervanaObject.be.bsz = batch_size
  
      dtypeu = np.float32
  
      init_unif = Uniform(low=1.0, high=1.0)
      layer = Linear(nout=nout, init=init_unif)
      inp = layer.be.array(dtypeu(np.ones((nin, batch_size))))
      layer.configure(nin)
      layer.prev_layer = True  # Hack to force delta buffer allocation
      layer.allocate()
  
      layer.allocate_deltas(deltas_buffer)
      deltas_buffer.allocate_buffers()
      layer.set_deltas(deltas_buffer)
  
      out = layer.fprop(inp).get()
      w = layer.W.get()
      sums = np.sum(w, 1).reshape((nout, 1)) * np.ones((1, batch_size))
  
      # for larger layers need to estimate numerical precision
      # atol = est_mm_prec(w, inp.get())
      assert allclose_with_out(
          sums, out, atol=0.0, rtol=0.0
      ), "%e" % np.max(np.abs(out - sums))
      return
  
file_path: neon/tests/test_linear_layer.py
imports: import itertools
  import numpy
  from neon import NervanaObject
  from neon.initializers.initializer import Uniform
  from neon.layers.layer import Linear
  from utils import allclose_with_out
label_desc: Use image node_id 3 for calling a global function with example usage: test_linear_ones(backend_default, basic_linargs, deltas_buffer) without return types