Previous month:
May 2016
Next month:
June 2017

Lightseal replacement on old cameras

I recently acquired a Yashica Mat-124G. As usual with vintage cameras, the light seals were rotten: gummy pieces of it were falling off.

Rather than shelling out the $10 (+ shipping) or so that some people are charging for replacement seals, I thought I would try to DIY. I found a blog post where someone had used adhesive-backed felt (available at most craft stores). So, I got some from Amazon since my local craft store did not carry any.

I cleaned out the old light seals with some Goof Off. Then, cut some 2-3 mm strips of the felt. I placed one, which went in crooked, so I ripped it off. Then I noticed all the lint. Just that small operation shed lots of lint. It was clearly visible on the cutting mat, and on my fingers. So, that was no good. I would not recommend felt. Maybe there is “photo grade felt” that does not shed? Anyway, I will be buying some bulk adhesive-backed closed-cell foam for the light seals. There are many listings on eBay, typically shipping from Hong Kong.


Google AIY Project - voice assistant

I saw issue 57 of MagPi magazine, the official Raspberry Pi magazine, on the newsstand last week, and it included a hardware kit to build a voice assistant like Google Home or Amazon Echo. It is produced by Google AIY Projects which aims “to put AI into the maker toolkit, to help you solve real problems that matter to you and your communities.” 

You just have to buy your own Raspberry Pi, and the SD card for storage, and a power supply if you don't have one handy. I got the Pi 3 Model B. A phone charger works well enough as a power supply, as long as it can put out a certain amount of current. 

It was pretty fun to assemble, nothing tricky and no soldering. Initially, the button light did not work, but a few minutes of flipping the LED and jiggling connections fixed it. I would say even a kid of 10 could do the assembly. The trickier bit is in doing the authentication stuff and getting API keys, etc. If  you have not done such a thing before, it's no big deal since the directions (in the physical magazine and the AIY website) lead you through it step by step.

 


Annoyances with machine learning, specifically neural network implementation

I'm doing Andrew Ng's Machine Learning course on Coursera. It's nice that they use Octave/MATLAB so that a lot of the matrix operations do not have to be written out. However, I wish they would decide if they want inputs and outputs to be column vectors or row vectors. The mathematical notation used throughout implies that they are dealing with column vectors. However, all the programming assignments deal with row vectors. The training set is given as a matrix, such that each row of the matrix is one training example, i.e. the training set is a "stack" of row vectors". The corresponding outputs are also in rows, naturally. That's well and good. I can deal with switching representations.

Until it comes to backpropagation, where they decide at the end that they really want things in row vectors. So, all the Delta arrays that I computed, which give the gradients, turn out to be transposed. After literally 20 times going over step by step, every single line in my code and comparing with the notation (doing the transpose in my head as well as on paper), and keeping track of matrix dimensions, I finally just transpose the Delta arrays at the end (a line of code that was pre-written by the instructor), and the answer came out correct.  </rant>