Part 1
In this exercise series, you'll work with a Recurrent Neural Network (RNN) to generate 3 fictional German names based on a dataset of ~700 german names. The script you'll interact with is based on PyTorch and demonstrates how AI-LAB can be used for sequence prediction tasks.
-
Log in to AI-LAB (Login guide)
-
Copy the folder
/ceph/course/claaudia/generating-names-with-pytorchto your user directory (Guide on how to copy a folder) -
Go into the copied directory
generating-names-with-pytorchand openname_generator.pywith nano (Nano guide) or vim (Vim guide) text editor. -
Add this line:
samples('German', 'GER')at the bottom of the code, save it, and exit the file. -
(Optional) run
cat name_generator.pyto print out the code, and verify thatsamples('German', 'GER')is at the bottom.
Solution
-
Run the following command on a command-line interface on your local Windows (Windows PowerShell), macOS, or Linux computer
ssh -l user@student.aau.dk ailab-fe01.srv.aau.dk. Replace user@student.aau.dk with your AAU email address.The first time you connect, you will get a message like:
The authenticity of host 'ailab-fe01.srv.aau.dk (172.21.131.1300)' can't be established. ED25519 key fingerprint is SHA256:xosJtOSfQyyW16c6RtpN8tAi/91XHCR3GxM9/KJEogg. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? Please confirm by typing 'yes' to proceed with the connection.Please confirm by typing
yesto proceed with the connection. -
Enter
cp -r /ceph/course/claaudia/generating-names-with-pytorch ~/to copy the directory to your user directory - Enter
cd generating-names-with-pytorchto go into the directory - Use
nano name_generator.pyto open the python file with nano text editor- Go down to the bottom of the script and enter
samples('German', 'GER'). - Press
CTRL+Ofollowed byENTERto save the file, then pressCTRL+Xto exit the file.
- Go down to the bottom of the script and enter
- Use
cat name_generator.pyand check thatsamples('German', 'GER')is now at the bottom of the code.