HNHacker News
TopNewBestAskShowJobs

timanglade

1,718 karma · joined April 2, 2007

submissionscomments
timanglade··on How HBO’s Silicon Valley Built “Not Hotdog” with TensorFlow, Keras and React Native
So the long version of this story is that the app was released in partnership with the HBO Go / HBO Now team, and using the terms of service they used for these apps (which are only available in the US & Canada). We’ve been working with lawyers to release the app worldwide without running afoul of any local laws, and I’m keeping my fingers crossed that will get cleared this week, we just gotta make sure our terms of service are up to par… After all, we wouldn’t want to fall prey to something we made fun of this very season ;) http://www.vulture.com/2017/04/silicon-valley-recap-season-4...
timanglade··on How HBO’s Silicon Valley Built “Not Hotdog” with TensorFlow, Keras and React Native
Boy I sure hope no one does a static analysis of the binary…
timanglade··on How HBO’s Silicon Valley Built “Not Hotdog” with TensorFlow, Keras and React Native
Just wanted to say thanks for the warm welcome from HN when the app was released last month — I hope this blogpost answers the questions that were raised back then.

I’d be happy to answer anything else you’d like to know!

Original thread: https://news.ycombinator.com/item?id=14347211

Demo of the app (in the show): https://www.youtube.com/watch?v=ACmydtFDTGs

App for iOS: https://itunes.apple.com/app/not-hotdog/id1212457521

App for Android (just released yesterday): https://play.google.com/store/apps/details?id=com.seefoodtec...

timanglade··on How HBO’s Silicon Valley Built “Not Hotdog” with TensorFlow, Keras and React Native
One of my primary motivators behind building this blogpost was to show how exactly one can use TensorFlow to ship a production mobile application. There’s certainly a lot of material out there, but a lot of it is either light on details, or only fit for prototypes/demos. There was quite a bit of work involved in making TensorFlow work well on a variety of devices, and I’m proud we managed to get it down to just 50MB or so of RAM usage (network included), and a very low crash rate. Hopefully things like CoreML on iOS and TensorFlow Lite on Android will make things even easier for developers in the future!
timanglade··on How HBO’s Silicon Valley Built “Not Hotdog” with TensorFlow, Keras and React Native
Yes, I was very excited we were able to release it for Android… And even though we used React Native, there were so many native (and C++) bits, it ended up being quite complex!

As for the gear, I think it’s really damaging that so many people think Deep Learning is only for people with large datasets, cloud farms (and PhDs) — as the app proves, you can do a lot with just data you curate by hand, a laptop (and a lowly Master’s degree :p)

timanglade··on Not Hotdog App
I can't recommend that course enough! I attended it in person and got a lot out of it. Jeremy & Rachel were also enormously kind & helpful outside of class.
timanglade··on Not Hotdog App
It was honestly just maybe 10 lines of code, but I was very confused about it before I got it done. The message passing is a bit counterintuitive at first. I'll try to share example code in my blogpost!
timanglade··on Not Hotdog App
I honestly thought the app itself would come across as too limited — and I wasn't quite sure how HN felt about the show it's attached to. I was preparing that technical blogpost specifically for HN because I thought that would be a more hacker-centric way of looking at the same thing.
timanglade··on Not Hotdog App
I should say a lot of people made the app possible, including the show's awesome producers, writers, designers, and a lot of kind folks at HBO. To answer your question, I was the only dev on the project, and I've been working on it since last Summer, on a very part-time basis (some nights and weekends). A lot of time was spent learning Deep Learning to be honest. The last revision of the neural net was designed & trained in less than a month of nights/weekend work but obviously couldn't have been achieved without the preceding months of work — but if I was starting today knowing what I know now yeah it'd probably be about a month of work. The React Native shell around the neural net was just a few weekends worth of work — mostly it was about finding the right extensions, tuning a few things for rendering/performance, and like a whole weekend dealing with the UX around iOS permissions to access the camera & photos (lol it's seriously so complicated).
timanglade··on Not Hotdog App
Sounds like you're further ahead than I was with the React Native part! Not Hotdog is very simple so I just wrote a simple Native module around my TensorFlow code and let the chips fall where they may performance-wise. The snap/analyze/display sequence is slow enough that I don't need to worry about fps or anything like that. As much as I enjoyed using RN for this app, I would probably move to native code if I needed to be able to tune performance.
timanglade··on Not Hotdog App
Yup that's basically it. The hack was just in getting Tensorflow to accept/load its neural network definition from the JS bundle (what CodePush distributes for you) rather than from the main Cocoa bundle.
timanglade··on Not Hotdog App
Hey so I actually tried Vgg, Inception and SqueezeNet, out of the box, chopped and trained from scratch (SqueezeNet only for the latter due to resource constraints).

We ended up with a custom architecture trained from scratch due to runtime constraints more so than accuracy reasons (the inference runs on phones, so we have to be efficient with CPU + memory), but that model also ended up being the most accurate model we could build in the time we had. (With more time/resources I have no doubt I could have achieved better accuracy with a heavier model!)

Training the final model took about 80 hours on a single Nvidia GTX 980 Ti (the best thing I could hook to my MacBook Pro at the time). That's for 240 epochs (150k images in an epoch) ran in 3 rate annealing phases, each phase being a handful of CLR (cyclical learning rate) phases.

I'll answer in more detail in the full blogpost, it's a bit complicated to explain in a comment. I'll have charts & figures for y'all :)

timanglade··on Not Hotdog App
It was random, I was already working on the show as what Hollywood calls a (technical) “consultant”: advising on storylines, dialogue, background assets, etc. When this idea popped up, someone suggested we build the app for real. We took a try and ended up building the entire thing in-house with the crew, as opposed to hiring an external agency to do it for us.
timanglade··on Not Hotdog App
It's actually written in React Native with a fair bit of C++ (TensorFlow), and some Objective-C++ to glue the two. One cool thing we added on top of React Native was a hack to let us inject new versions of our deep learning model on the fly without going through an App Store review. If you thought injecting JavaScript to change the behavior of your app was cool, you need to try injecting neural nets, it's quite a feeling :D
timanglade··on Not Hotdog App
Yup sorry about that, the app is available only in the US (& Canada) due to some legal restrictions we couldn't avoid. FWIW I also worked about on Richard's New Internet concept for this season so I definitely hear ya ;)
timanglade··on Not Hotdog App
About 150k total images, 3k of which were hotdogs. The results are far from perfect (there's ton of subtle — or hilarious — ways to trick the app) but it was better than using a pre-trained model or doing transfer learning, accuracy-wise (honestly it was even better than using Cloud APIs). As for the difficulty in preparing the training set, I'll just say I definitely empathize with Dinesh and Jian Yang’s feelings in episode 4 :D
timanglade··on Not Hotdog App
Ha didn't expect this to end up here. If anyone is interested, I'm working on a blogpost explaining how we built the app in detail… It uses embedded TensorFlow on device (better availability, better speed, better privacy, $0 cost), with a custom neural net inspired by last month's MobileNets paper, built & trained with Keras. It was loads of fun to build :)
timanglade··on Why we are not leaving the cloud
We quote a lot of responses from HN but that doesn’t mean it’s the only thing that led us to this decision. I was personally involved in a lot of private conversations about this, with the executive team, with investors and with people who had gone through this exercise before, and they all had as much if not more impact on our final decision than the HN thread did. It’s just harder to quote them than referencing additional (& similar) opinions noted in a public forum.
timanglade··on New GitHub Terms of Service require removing many open-source works
We want to be the platform where everyone can contribute, and that necessarily includes having a great GitLab.com Our strategy [0] page goes into more details there, including our business goals sequence [1] to be the preferred platforms for private repos, then public repos within a few years.

[0]: https://about.gitlab.com/strategy/

[1]: https://about.gitlab.com/strategy/#sequence

timanglade··on TensorFlow 1.0 Released
Essentially there are two ways to do this. The “old” way is to export your TensorFlow neural network into a protobuf file, then load up the TensorFlow interpreter in your iOS/Android app, feed it the neural net, and run the inference directly on device. The GitHub repo [0] has a good set of examples of what that looks like in practice.

The new, still experimental way is to compile your neural net into executable code with their XLA / tfcompile tool, and link that into your app. They are adding more docs on this on the TensorFlow website [1].

[0]: https://github.com/tensorflow/tensorflow/tree/master/tensorf...

[1]: https://www.tensorflow.org/versions/master/experimental/xla/...

timanglade··on TensorFlow 1.0 Released
I don’t have any experience with that unfortunately. I’ve seen a couple of talks/demos/announcements about it and it sounds like it’s automatic, but I haven’t been able to find the SDK or any tutorial for it, so I’m not 100% sure. The Qualcomm speaker this morning said there would be more details about it later today but I don’t see anything on the Agenda [0]. Maybe Pete’s session at 12:40 will cover it?

[0]: https://events.withgoogle.com/tensorflow-dev-summit/agenda/#...

timanglade··on TensorFlow 1.0 Released
Been using Tensorflow embedded in a mobile app for a few months and honestly, I’m constantly surprised at how well thought-out the tooling is, and how quickly you can get results. Conversely, I think a few things are still unnecessarily dense (installing dependencies, optimizing hyper-parameters, and some of the embedded/XLA stuff is very raw). Kudos to the team though. It sounds like they’re on the right track with TF overall, and focusing on performance (including the XLA stuff) + ease of use (high-level, Keras API) is absolutely what I want as a user right now. Keep up the great work, y’all.
timanglade··on Blood, Sweat and Years: Raising Money as a Deep Learning Startup
Hey hi Chris! Nice to see you in these parts. It’s been amazing to see you go through YC and get that fundraising done and chat with you since then. Clearly you guys have done a great job of learning — and really internalizing — this kind of business lesson, which can be hard to grasp for most founders in the madness of YCombinator. I’d highly encourage everyone to take the advice contained in the article seriously. Hyped areas like Deep Learning can sometimes provide companies an extra bit of float when it comes to fundraising but as Chris says, there’s no substitute for great fundamentals + lots of practice when it comes to fundraising. Please keep sharing Chris.
timanglade··on Marc Andreessen at Startup School [video]
I grossly underestimated the value of a warm intro in Silicon Valley before getting here, and still did before I started working for a VC firm. Coming in as an entrepreneur from smaller startup ecosystems in Boston & Europe, I was a bit puzzled by it — it seemed like unnecessary decorum or just a cheap ploy by VCs to maintain their inbox zero streak. Beyond the a16z process explained by Mr. Andreessen here, I should note that any third-party intro (to say nothing of a warm intro) will drastically enhance your chances at almost any firm even if they don’t require it. It’s a sign of hustle, diligence & genuine interest from entrepreneurs, even if the person that introduces you isn’t particularly warm about you or friendly with the partner in question. You’d be surprised how many founders fail to display that hustle/diligence/interest in discussions with VCs!

I wouldn’t overthink the warm bit too much. Usually just by virtue of being willing to make the intro your contact will be warm and exude warmth. But I’ve also seen partner take intros from people they barely know/remember/trust if the pitch is compelling. Just make sure you stay connected to partners and potential connectors way ahead of time, and that they know you & your business. When the time comes, an intro will be a no-brainer.

timanglade··on Microsoft Cognitive Services
The Cloud AI wars are heating up, with everyone now offering GPUs specifically for HPC and Machine Learning use-cases, or advanced Machine Learning APIs like Microsoft’s Cognitive Services.

That said, I really like Google Cloud’s new Machine Learning APIs [0], which go the extra mile and let you train & run your own models, in a NoOps kind of way. This is greatly useful because there is relatively little value, in my research so far, in just using pre-packaged models like Google Cloud Vision or Microsoft Cognitive Face Detection — most cases I’ve run into require building your own model, or transfer-learning to your own use-case. Kudos to Google Cloud for offering that in beta early, and I’m hoping Microsoft will follow suit!

[0]: https://cloud.google.com/ml/

timanglade··on Where San Francisco Wants New Subway Lines
San Francisco[0] proper has a higher density than London[1], and slightly lower density than Paris[2] — two cities that have thriving subway + commuter rail systems.

[0]: https://en.wikipedia.org/wiki/San_Francisco

[1]: https://en.wikipedia.org/wiki/London

[2]: https://en.wikipedia.org/wiki/Paris

timanglade··on ResinOS, run Docker containers on embedded devices
Congrats on launching! Testing & deployment of stable configs is arguably even more of an issue in embedded development than in web, so I'm sure this will make a lot of people very giddy! Are y'all 100% happy with the technical design assumptions & requirements of Docker, or did you mainly pick it so you could bridge with the existing community (or a bit of both?)
timanglade··on Workplace by Facebook opens to sell enterprise social networking to the masses
Agreed! Tools almost always reflect the flaws of their users — but it’s not to say that the flaws of the tool proper can’t harm a user too. In Slack’s case, I think their notification settings (and the defaults in particular) encourage an always-on culture that can be hard for some corporate cultures to resist.

Regarding public communications — I think that only aggravates the noise/always-on issue, but if that’s your think, you can of course do that on email. See examples from Stripe [0] and Buffer [1]. (Not sure if/how that scales though! Was there a follow-up from these companies?)

[0]: https://stripe.com/blog/email-transparency

[1]: http://joel.is/how-we-handle-team-emails-at-our-startup-defa...

timanglade··on Workplace by Facebook opens to sell enterprise social networking to the masses
Considering the backlash against Slack [0], it’ll be interesting to see if Messenger’s model of more “atomic” conversations will create less interruptions. Slack (much like IRC) really contributes to an expectation of continuous conversation throughout the day/night (although not all people deal with it that way). In comparison, Messenger (and other chat apps like WhatsApp, iMessage, etc.) seem to be more designed towards short chats about specific topics, while still allowing for deeper, longer conversations (even larger groups) if needed. Could be a huge win.

Beyond that, am I the only one surprised at Live being half-heartedly pushed as part of Workplace? The use-cases they give seem liminal at best, and even the mockups they made are really half-assed. Seems like even Facebook Inc doesn’t believe in Live’s potential in the workplace, which seems narrow-sighted. Sure, Live might not be a great internal corporate tool, but it could be a great replacement for external webinars, webcasts & trainings.

[0]: http://www.slacklash.com/

timanglade··on Realm Mobile Platform – Realtime Sync Plus Fully Open Source Database
See the full answer from Realm’s founder/CEO here: https://news.ycombinator.com/item?id=12590753
← PreviousPage 2 of 4Next →