Rowan Zellers' blog miscellany about AI

Building a deep learning box

I haven’t posted on this blog in a while, so I figured it would be a good idea to do so more! I thought it might interest people to see the kind of deep learning systems we have here. (Also, it’ll be nice to refer back to this post next time I have to build a system for the lab).

Here’s the steps I used to build the computer. A lot of these are adapted from wikihow which was a useful resource.

0) Get the parts

Here’s a list of the parts that I used. However, I decided to build this for 3 gpus, not 2, since the 3rd GPU was just sitting around otherwise! The only thing I wasn’t able to find there was this 1300W power supply. Let me know if you have any thoughts about the part selection.

Here are the parts after unpackaging: parts

1) Add the power supply

You’re going to first want to unscrew the top of the box:

box Note: you might also want to remove the left and right sides of the box (facing at it from the front) - once you do that, you can also remove the horizontal metal sheet in the middle of the box.

Next, get out the power supply. We’re going to plug in a bunch of cables, like so:

power supply

You’ll need to attach one cable each for the CPU, motherboard, and SATA. Additionally, you’re going to want to add cables for the GPUs. The GPUs that I’m using (Titan X’s) require two power inputs: one cable with 8 wires (in a 2x4 configuration) and another with 6 wires (in a 2x3 configuration). Conveniently, the EVGA power supplies have two sets of cables that plug into one slot in the motherboard and that each have two outputs: one 6-pin, another 8-pin. There are other VGA cables that have changeable 6-pin / 8-pin outputs, so you’ll need two of those. That adds up to 4 VGA cables in total. Last, you’ll want to add a PERIF cable for the fans (not shown in the picture).

Then, place the power supply in the machine and screw in the back. You’ll want to play with the wires so that when you add the horizontal metal sheet back in, they don’t get super tangled.

power supply

2) Add the motherboard

This is possibly the most challenging part with any installation, so beware! Remove the motherboard from the packaging and place it on the box (careful not to put it on the anti-static bag, as the bag conducts electricity). Take off the cover from the processor slot- it should snap right off once you unhook the metal hinges.

processor

Then, install the CPU. There’s only one way it can go, so rotate it 180 degrees if it doesn’t slide right in. Close the arms, and you’re done!

Now, follow the instructions on the heatsink. Add the smaller pegs to the holes around the processor - don’t do what I did and add the large pegs because you’ll have to unscrew them later! Then, apply a drop of thermal paste on top of the processor, then place the heatsink over it. Place the X-shaped piece in the middle (careful of the orientation), then screw it in.

The seal should be pretty snug and you might have to push on the screws a little to get it in. Don’t over tighten, though, because one of my screws broke and the end landed in the peg attached to the motherboard! Thankfully, I managed to deal with it by using a tiny black screw left over from a previous build, attached to a larger peg.

Next, you’ll want to mount the motherboard. Screw in the standoffs which hold the motherboard over the metal horizontal sheet you removed. Add the cover in the back of the machine behind the USB ports, and then attach the SATA cables to the disk slots (right in front of the power supply). In the end, you’ll get something like this:

processor

Next, you’ll need to add the SSD, the RAM, and the CPU fan. Those should hopefully be pretty straightforward :)

The last step for setting up the motherboard is to plug in the power button / reset button / light cables that are attached to the motherboard (and what allow you to actually turn on the computer!). For me, these all were supposed to be hooked up to the front left corner of the motherboard.

4) Add the GPUs

The last step, hardware wise: add in the GPUs and attach the power cables that you already had from the power supply. That’s it, and you should be good to go!

5) Install Ubuntu

We built the computer, so now we need to give it an OS! I chose Ubuntu 16.04. You’ll want to use unetbootin to download Ubuntu onto a USB stick, and that should work for the install.

Whew! Hope this helps someone so that they make fewer mistakes than I did (on my second major build, no less.)

How to win the NSF Fellowship

If you’re a first or second year graduate student in the sciences, or are planning to apply to graduate school during this cycle, there’s a good chance that around now you’re applying for the National Science Foundation Graduate Research Fellowship (NSF GRFP). I won the fellowship this past March (with a lot of help) and thought I’d share some advice of my own.

I’m not the only one with NSF advice to read - I recommend checking out what these people have to say:

In addition to reading these guides, I was also given advice from a several professors. All told, I had six professors read over my application materials (at various stages of completion) and give me advice. My goal in writing this post is to share their tips with a wider audience.

Disclaimer: the following is a single datapoint. I don’t claim to be the authority on what the NSF reviewers are looking for - I’m merely a student who has gone through the process once. Take my advice with a (large) grain of salt.

1) Write a research proposal on whatever (in your area of expertise) has the most broader impact.

First, it should be noted that the NSF does not expect you to actually carry out your research proposal. On the contrary, the research proposal requirement seems to test your ability to sketch out a coherent research plan for a couple of years… and to discuss its (hopefully fantastic!) *broader impact (on society.

As the authors that I linked to above all note, broader impact is one of the most important parts of the NSF fellowship application, and it’s one that a lot of people overlook. As Michael Ernst writes, “Better type systems or even better software is not a broader impact. Keeping planes from falling out of the sky is a broader impact.” Ideally, your broader impacts should be as clear as that.

My personal advice is to select a project that has a clear and obvious benefit to society in some way. To give an example, my final proposal was on building a machine learning system to help therapists diagnose and monitor patients with psychological distress. I made the broader impact very clear: such a system would allow more resources to be spent on high-risk patients, which saves real lives. The clearer the link between your project and societal benefit is, the easier it will be for your reviewers to justify giving you all of the broader impact points.

Such a project has to be realistic, though. Ideally, your proposal will make the case to your reviewers that you, and only you will be able to carry out your research and achieve that broader impact, owing to your unique skills and past research experience.

To make your broader impacts stand out, you should make them as specific as possible. While I was writing my application, I was a senior at Harvey Mudd (and thus had not been committed, or accepted, at a grad school yet). I wrote my application from the (not necessarily true) perspective that I was going to be a new graduate student at Carnegie Mellon the next year. (It worked well for me because I had done undergraduate research at Carnegie Mellon the summer before my senior year, with my advisor from there writing my rec letter.) I’d recommend doing something similar if you’re an undergraduate, since this let me build my proposed graduate career off of things I had already done. I had an advisor who supported me already, and I tied the outreach and mentorship that I had done at Harvey Mudd with specific outreach programs at Carnegie Mellon that I would theoretically work with. If you’re already in grad school, you should do the same thing (except hopefully now, you’ll be working with your school’s outreach programs for real)!

2) Focus both statements around your research vision.

By research vision, I don’t mean what things you will accomplish in the next couple of years in graduate school - instead, think about what you’re passionate about accomplishing in the longer term. This is more challenging than writing about what general area you want to go into in graduate school, but it will come off as more exciting.

To give a real example: my ‘vision’ was to employ a mix of computer vision and natural language processing to solve clinical problems (specifically, in psychiatry). I started my personal statement by articulating my vision, and then went over my undergraduate research experiences that led me to that point.

If done well, your research vision will hook the reader and leave a positive lasting impression. Most people are going to fill their personal statement with descriptions of their past research experience and their volunteering and mentorship activities. Although you should include these things too, you should frame these in terms of your overarching vision.

3) Have lots of people read your application.

I suppose this year it’s kind of late for that (apologies for writing this too late). You should talk to people in your area as well as not in your area. That’s good for two reasons: you want to make sure that your application is easy to understand for a non-specialist, but on the same token, if someone in your area happens to read your application, you don’t want them to ding you points for feasibility or correctness.

Another thing that you might want to during the revision process is to brainstorm what points to focus on, as well as what area of research to list as your ‘specialty.’ (Granted, this only applies if your research straddles several disciplines).

How I wrote my proposal

Unfortunately, I was not aware of all of these tips when I was writing my proposal (had I known, maybe I would have saved some time)!

While writing my proposal, I had just finished my second summer of undergraduate research, and so decided to write my proposal about a project which was the next step up from my undergraduate research. However, when I enthusiastically showed it to one of my professors for feedback, she suggested that I start over.

Unfortunately, my proposed project read as more of a one-year research plan, rather than one for three-plus years. This meant that it didn’t have much broader impact associated with it.

So, I started back at the drawing board. I looked at the kind of work I had done with my undergraduate lab, and how future work in that area could be applied in the real world. (I should note that I was very lucky here, since my lab is very application-oriented and I had several fantastic mentors for me to discuss this with).

Eventually, after several rounds of revision from my professors and peers, I had something that I was happy with, and I won the fellowship.

Hope this helps. If you have any feedback, let me know in the comments!

New Blog!

Welcome to the first post on my new blog! Since a lot of the researchers I follow all have research blogs, I figured I should create one of my own.

I’m not new to blogging - years ago, I helped to maintain a Wordpress blog for an organization I was interning at. However, Wordpress is a ginormous piece of software, and it was a pain to remove all of the spam that accumulated on our site. Because of that, I chose a more lightweight solution for this blog.

Right now, I’m using the Jekyll engine with a theme based on Lanyon. The key advantage of Jekyll is that it builds a static website for me. That means that when a user (such as yourself) visits my blog, they are served raw HTML and CSS files that have been pre-generated. This is in contrast to what Wordpress does, whereby the blog is generated dynamically from posts stored in a database somewhere.

I figured that I would abandon this site if it wasn’t super easy to use. Thankfully, I’ve set it up so that posts are created automatically when I push to my git repository. This also means that my files also get backed up in github! See this tutorial for how I did that (it involves adding a post-receive hook).

More to come!