Rate This Document
Findability
Accuracy
Completeness
Readability

Running and Verification

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Create a test file, test.py.
    1. Create test.py.
      vim test.py
    2. Press i to enter the insert mode and add the following content to the file:
      import theano
      from theano import tensor
      ##declare two symbolic floating-point scalars
      a = tensor.dscalar()
      b = tensor.dscalar()
      ##create a simple expression
      c = a + b
      ##convert the expression into a callable object that takes (a,b)
      ##values as input and computes a value for c
      f = theano.function([a,b], c)
      ##bind 1.5 to 'a', 2.5 to 'b', and evaluate 'c'
      assert 4.0 == f(1.5, 2.5)
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Perform a test.
    python3 test.py

    No command output is displayed, indicating that the conclusion "1.5 + 2.5 = 4.0" is true.

  4. Create a test file, test2.py.
    1. Create test2.py.
      vim test2.py
    2. Press i to enter the insert mode and add the following content to the file:
      import theano
      from theano import tensor
      ##declare two symbolic floating-point scalars
      a = tensor.dscalar()
      b = tensor.dscalar()
      ##create a simple expression
      c = a + b
      ##convert the expression into a callable object that takes (a,b)
      ##values as input and computes a value for c
      f = theano.function([a,b], c)
      ##bind 1.5 to 'a', 2.5 to 'b', and evaluate 'c'
      assert 4.5== f(1.5, 2.5)
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Perform a test again.
    python3 test2.py

    An error is reported, indicating that the conclusion "1.5 + 2.5 = 4.5" is incorrect.