How HBO’s Silicon Valley built “Not Hotdog” with mobile TensorFlow, Keras & React Native

How HBO’s Silicon Valley built “Not Hotdog” with mobile TensorFlow, Keras & React Native

  • While this is a subject of some debate these days, our experiments placing BN after activation on small networks failed to converge as well.To optimize the network we used Cyclical Learning Rates and (fellow student) Brad Kenstler’s excellent Keras implementation.
  • This was hard to defend against as a) there just aren’t that many photographs of hotdogs in soft focus (we get hungry just thinking about it) and b) it could be damaging to spend too much of our network’s capacity training for soft focus, when realistically most images taken with a mobile phone will not have that feature.
  • Of the remaining 147k images, most were of food, with just 3k photos of non-food items, to help the network generalize a bit more and not get tricked into seeing a hotdog if presented with an image of a human in a red outfit.Our data augmentation rules were as follows:We applied rotations within Âą135 degrees — significantly more than average, because we coded the application to disregard phone orientation.Height and width shifts of 20%Shear range of 30%Zoom range of 10%Channel shifts of 20%Random horizontal flips to help the network generalizeThese numbers were derived intuitively, based on experiments and our understanding of the real-life usage of our app, as opposed to careful experimentation.The final key to our data pipeline was using Patrick Rodriguez’s multiprocess image data generator for Keras.
  • Phase 2 ran for 64 more epochs (4 CLR cycles with a step size of 8 epochs), with a learning rate between 0.0004 and 0.0045, on a triangular 2 policy.Phase 3 ran for 64 more epochs (4 CLR cycles with a step size of 8 epochs), with a learning rate between 0.000015 and 0.0002, on a triangular 2 policy.While learning rates were identified by running the linear experiment recommended by the CLR paper, they seem to intuitively make sense, in that the max for each phase is within a factor of 2 of the previous minimum, which is aligned with the industry standard recommendation of halving your learning rate if your accuracy plateaus during training.We were able to perform some runs on a Paperspace P5000 instance in the interest of time.
  • In those cases, we were able to double the batch size, and found that optimal learning rates for each phase were roughly double as well.Running Neural Networks on Mobile PhonesEven having designed a relatively compact neural architecture, and having trained it to handle situations it may find in a mobile context, we had a lot of work left

How Silicon Valley build the real AI app that identifies hotdogs — and not hotdogs using mobile TensorFlow, Keras & React Native.
Continue reading “How HBO’s Silicon Valley built “Not Hotdog” with mobile TensorFlow, Keras & React Native”

[React Native 016.3] Using GraphCool with React Native

Using @graphcool with @reactnative -  #reactNative #programming

  • The second screen is a screen to create a post, by passing the image URL and the post description.
  • The rest of the ListPage component is just a list showing each Post and its image.
  • Let’s use this mutation and create a new Post:

    Once we run this mutation, we can refresh our app and see this new Post we have created in our app.

  • On the inline code, we will put our code, it does a POST request to our slack, and we will pass the post description and image url.
  • Let’s save, that, open our slack and create a new Post in our App.

A serverless solution for GraphQL that works great with React Native
Continue reading “[React Native 016.3] Using GraphCool with React Native”

Day 70 First React Native App – Jon Ramer – Medium

Day 70 First React Native App  #webdevelopment #projectmanagement #reactjs #reactjs

  • Day 70 First React Native AppFirst React-Native App CompleteDay 70 is in the books!
  • Today I spent the entire day finishing up a React-Native tutorial that walked through how to make a basic app.
  • Pretty basic stuff, but I definitely learned a ton about how React manages components, state, etc…I still have lots of questions about React-Native, but I think I know enough at this point to start trying to convert my Simon game into an app that can run natively on IOS.
  • That’s my MVP to get it running on IOS where I can demo the app during the presentation.Upcoming ChallengesI mentioned in my last post that styles were going to be difficult in React.
  • Apart from the CSS challenge I don’t “think” there is any reason why I shouldn’t be able to get everything working by Thursday or maybe even sooner if I have some luck.TomorrowI’m going to create the boiler plate for my Simon app tomorrow and start migrating things over.

Day 70 is in the books! Today I spent the entire day finishing up a React-Native tutorial that walked through how to make a basic app. I’m starting to get a much better understanding of how things…
Continue reading “Day 70 First React Native App – Jon Ramer – Medium”

A Glimpse Into The Future With React Native For Web – Smashing Magazine

A Glimpse Into The Future With React Native For Web – @smashingmag

  • We have already seen how1 React Native can help you make iOS and Android apps with a shared code base, without sacrifices in quality.
  • React Native for Web is intended to let you write a single app that runs in a browser using standard web technologies, or on iOS and Android as a real native mobile app.
  • React Native for Web’s solution is to provide browser-compatible implementations of React Native’s components — meaning, for example, that the of React Native has a DOM-based version that knows how to render to a .
  • At this point, your file should look something like this:

    While we have what seems to be everything required for our React Native app to run in a web browser, we must take a brief detour to consider the realities of web development.

  • This will be a good simple stress test of React Native for Web, because we need to use a few different components for it: , , and .

React Native can help you make iOS and Android apps with a shared code base, without sacrifices in quality. Clayton Anderson takes a glimpse into the future with React Native for Web…
Continue reading “A Glimpse Into The Future With React Native For Web – Smashing Magazine”