Wednesday, June 18, 2014

Research is hard

Before I start on actual content: I changed my blog template! I had had the original one since approximately January 12, 2008. That's 6 years ago. This one is kind of boring, but the gray background won't mess up pictures too much.

But anyways, research is hard. I'm trying to making a neural net that will read in a bunch of series of words (called ngrams) and try to use the middle word to predict the words around it. You might say, "that doesn't sound very useful, why would you want to predict words around a word?" and I totally agree; it isn't very useful. What is useful, is that to predict the surrounding words, the system first projects the middle word into a vector in a continuous space (at first to a random spot). Then, when it predicts wrong, it adjusts the vector a little bit in the direction that would have predicted the right word. After many iterations, these vectors end up containing information about the word that is useful to the system when predicting nearby words. Since similar words tend to be surrounded by the same words, similar words get clumped together. Once we have these projections, we can do cool stuff like translate phrases from English to French semantically rather than just using the most common words.

So I write the code for this neural node, run it on a small piece of data, and it seems to learn (the number it gets wrong while training goes down). Cool beans. I get the actual data and holy moley, there are 350,000,000 samples inside. My code can run about ~225 samples per second, so that would take about 3 weeks... Right now I am trying to run 10,000,000 samples, and it is not going so well. Not only is it taking longer than the predicted 12 hours, but after going down at first, the cost is now wavering back and forth very far from 0. This probably means my learning rate is too high, but the cost does seem to be decreasing slowly if I look at it from afar. 

To make us all feel better, here are some pictures from my weekend wandering:

A bakery with no sugar and white flour. It has integral bread, but that just sounds derivative.

Don't cook, just eat!

This picture isn't funny, but that bread looks delicious.

I too drink my mushrooms as tea.

Saturday, June 14, 2014

I'm in Canada!


After many months of stressing about whether I was going to be allowed to work in Canada, I successfully got my work permit and started my internship at the beginning of this week. Yay! I'm doing computer science research in Montreal, which is pretty darn awesome. My coworkers are a fun bunch: to celebrate someone's Doctorate, one student got him a machete, and we hiked up the mountain to play real life fruit ninja! Turns out coconuts are really hard to slice, but melons work surprisingly well.

Montreal is an interesting city. In the US, I generally know what language to use when talking to people: if they are my parent's French friends, I use French, otherwise I use English. In Montreal, most people speak both, but would be more comfortable using one language over the other. It's a confusing guessing game.

Nonetheless, I have definitely been enjoying life here. I love walking around my neighborhood and checking out the little grocery stores and cafes. I seem to be living at the intersection of a Greek neighborhood and a Hasidic neighborhood, so there are a lot of Greek restaurants and kosher grocery stores. Even the generic grocery store has interesting greek cheeses that I had never tried before (including Mizithra, which my Greek friend keeps talking about). This morning I also saw freshly grilled Souvlaki being sold outside one of the Greek restaurants! I'll have to try that next week (or perhaps tomorrow if it is still there).

I've been lazy about bringing my camera places, but I promise I'll be better next week. In the meantime, here are some things I've found with my phone camera:





There is a fruit store near my lab that has some nice looking and rather inexpensive fruit. It's "La Sucrerie" and it sells fruit, pastries, and maple syrup. It also does not seem to exist on the internet (...?) Unfortunately, it is really far from my apartment, so I won't be going shopping there very often.


There is a used bookstore about 5m from my apartment building! It does not seem to have much Sci-Fi/Fantasy, but as I only brought 2 books with me, I'll probably end up getting some books from there :)

As a final treat, here is a video of the post-doc I'm working with slicing through a cantaloupe :)

Wednesday, December 11, 2013

Curried Butternut Squash with Red Chard

It's almost the end of the semester! Final projects and final exams are everywhere sucking up time like giant time vacuums! I don't even know what a time vacuum is, but maybe it removes all the trash in your time, like browsing the internet, watching TV shows and the like? With final project time vacuums, none that useless stuff is left! Success! Or something like that.

Anyways, you know what the time vacuums have not sucked away? Time spent making food. I made some pretty darn delicious food yesterday. At some point in the past month, I saw mini butternut squashes at Safeway (they call it Vons here, but really it's Safeway), so I jumped on the opportunity to buy squash that I wouldn't have to spend multiple weeks eating. This week, I finally got around to cooking it. I first roasted the squash Sunday night:

Roasted squash! I couldn't help but try a spoonful
On Tuesday night, I actually got around to preparing the squash for consumption. Since my friend had some extra coconut milk, I decided to prepare it curry-style with ginger, cumin, turmeric, curry powder, cardamom, and a good spoonful of Thai red curry paste. I heated some oil in a pan and fried the spices to "release the aromas" (as they always say on America's Test Kitchen).


I sliced up the squash, and added it to the spices. I let it cook for a while.


And then added about a quarter cup of coconut milk and mushed up some of the squash pieces. 


At SafeVons, I also found a beautiful bunch of red chard, so I decided to try it out by simply sautéing it in a bit of oil.





Yay balanced meals! The squash was super delicious, with the ginger, curry, and cardamom being the strongest flavors. The chard was chard-like, which I liked.  Also, I can make rice now....


Monday, October 7, 2013

Apple Salad



I'm back from the Grace Hopper Celebration of Women in Computing! It was awesome. Check out this lab's research on prosthetic retinae.

The food at the conference was definitely not the emphasis though; dinner on Wednesday consisted of a dry and vegetable-less turkey sandwich with a cookie. My dinner tonight is much tastier. I got a giant acorn squash from Trader Joe's yesterday, and I was totally going to cook it tonight. Then Laziness struck. So instead I made a quesadilla and salad.

But the salad. It is a special salad. I started with an apple. I don't usually put apples in salads, but my friend had me try apples with dressing a couple weeks ago, and I had to agree that it works well. I chopped up an apple into my usual mustard-olive oil-vinegar dressing. Then I added some romaine and some kale. To add color, I chopped up some of my ever-present baby carrots. When I tried my creation, it was good, but was missing some creaminess and tang: crumbled goat cheese brought the salad to a new level.