If you have never used UNIX before, or are unsure about some of the basic commands, please see here.
To get started on the assignment, you will need to get and install a copy of the program in your directory. To do this you should:
At this point, if you're in the lab, you may need to open a terminal window if there isn't one already there. If you don't know how to do this, ask someone for help. (A command like "xterm" or "Terminal" should be available in a menu that appears when you click on the desktop with the right mouse button.)
space.tar.gz
to your directory (don't forget the period at the end):cp ~cs182/programs/space.tar.gz .
Note: if at some point in the process you get a message saying that you are over the disk quota, you should erase some of your previous files from the account, such as the .netscape/cache files.
gunzip space.tar.gz
tar xvf space.tar
(be patient -- this may take a little
while)cd NonPunctate
to get to the directory.more ReadMe
to read instructions
and additional information on running the program. The essential ones are
listed here.)
Each spatial relation term corresponds to a spatial "concept". A concept is composed of a set of possible "scenes". When given a set of scenes that correspond to a concept (say the ABOVE concept), the program is able to learn to label appropriate scenes with the spatial term (ABOVE).
do see above
do
see above-neg
do see above-test
Note: You can type "q" on the window to quit displaying the scenes,
or background it (e.g., by initially typing do see above &
).
Tip: If the command above doesn't work (e.g., it saysCommand not found
), make sure the current directory is in your path. You can force thedo
command from the current directory to work by typing./do see above
, or you can try to fix your path by typing:source ~cs182/adm/class.cshrc
. (This may work better from within the tcsh shell, so you can try first typingtcsh
at the prompt (see here), and then trying the source command.)
Tip: If you get the error message "Exec file format error", it's probably because you're not logged into a machine running Solaris-x86. Use ssh to login to a machine that does run it. For example, type "ssh po.cs" and enter your password as usual, then change to the appropriate directory. Now it should work fine.
probably because you're not logged into a machine running Solaris-x86. Use ssh to login to a machine that does run it. For example, type "ssh po.cs" and enter your password as usual, then change to the appropriate directory. Now it should work fine.
You can use similar commands with other spatial relations terms. For example, the corresponding commands for IN are:
do see in
do see in-neg
do see in-test
NonPunctate/Scenes/English/
directory; these include:
above below bigger enclose in left near on out overlap right smaller touch
The scenes you have just seen are used to train the program to recognize images corresponding to the different spatial terms. To train the program to learn the concept ABOVE, type
do train above
The program should show how its network for ABOVE performs on the training patterns for ABOVE, with the error decreasing over a number of epochs. When prompted for the number of (additional) to continue training, if you are satisfied with the error (the number of bits wrong is low, and the error value is small) then you can stop the program by specifying "0" in response to the prompt:
Enter number of epochs to train: 0
If you are unsatisfied with the error and want to continue training, enter a number of epochs (say, 50) in response:
Enter number of epochs to train: 50
When you eventually enter "0", the program automatically displays the results of the training. The number at the bottom of each scene in the display tells you how strongly the program classifies the scene as belonging to the relevant concept. For instance, a value of "0.9999999" on a scene for ABOVE means that the system has classified that scene as a very good instance of ABOVE. A value of "0.0000001", on the other hand, indicates that the program has classified the scene as not ABOVE.
When you have looked at the trained data, type "ctrl-c" on the terminal. You will now see the trained data for the negative examples of the same concepts. Type "ctrl-c" again when you are done looking at these.
You will be asked if you want to save the weights. Answer yes by entering "1" in response to the following query:
Want to dump weights [0=>no, 1=>yes]? 1
At this point, the network has been trained to recognize ABOVE and can be tested on previously unseen scenes.
Once you have trained the network and saved the weights of the training as explained in Part 3, you can test the network on unseen examples by typing:
do test above
The program will display the results. Just as in the training case, the number at the bottom of each scene indicates how strongly the program classifies the scene as part of the relevant concept.
below bigger enclose right near out inFor each of these concepts:
into blue between inside past aroundPick 4 out of these 5 concepts. Based on what you know about the features handled by the program, would you expect these concepts to be learnable given appropriate training examples? Would they be learnable by the dynamic version of the program? What additional features would be necessary to allow the system to learn?