Adventures in fizzbuzz

Yesterday I stumbled across this amusing (presumably fictitious) account of Joel Grus' massively over-engineered response to the fizz-buzz test, using TensorFlow (with one-hot encoding, a ReLU activation function, and a softmax cost function).

It was both an amusing account of interview pagentry, as well as of the inclination some starting out in AI (including me initially) have to leap to a quasi-magical solution in search of a silver bullet.

Lacking imagination, I probably would have gone for an unnecessarily terse one-liner, e.g.:

print(['fizzbuzz' if i % 15 == 0 else ('buzz' if i % 5 == 0 else ('fizz' if i % 3 == 0 else i)) for i in range(1, 101)])