Posts

Showing posts from November, 2020

Freezing models in Tensorflow

Image
Not my original post. However made some updates minor in the posts with latest version Freeze Tensorflow models and serve on web In this tutorial, we shall learn how to freeze a trained Tensorflow Model and serve it on a webserver. You can do this for any network you have trained but we shall use the trained model for dog/cat classification in this earlier tutorial  and serve it on a python Flask webserver.  So you trained a new model using Tensorflow and now you want to show it off to your friends and colleagues on a website for a hackathon or a new startup idea. Let’s see how to achieve that. 1. What is Freezing Tensorflow models? Neural networks are computationally very expensive. Let’s look at the architecture of alexnet which is relatively simple neural network:  Let’s calculate the number of variables required for prediction:           conv1 layer: ( 11*11)*3*96 (weights) + 96 (biases)     ...

Steps to install SoX with mp3 support in macOS X

Ankits-MacBook-Pro:lame-3.99.5 ankitshah$ brew install lame ==> Downloading https://homebrew.bintray.com/bottles/lame-3.99.5.high_sierra.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring lame-3.99.5.high_sierra.bottle.1.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/lame Target /usr/local/bin/lame already exists. You may want to remove it:   rm '/usr/local/bin/lame' To force the link and overwrite all conflicting files:   brew link --overwrite lame To list all files that would be deleted:   brew link --overwrite --dry-run lame Possible conflicting files are: /usr/local/bin/lame /usr/local/include/lame/lame.h /usr/local/share/doc/lame/html/about.html /usr/local/share/doc/lame/html/abr.html /usr/local/share/doc/lame/html/cbr.html /usr/local/share/doc/lame/html/contact.html /usr/local/share/doc/lame/html/contributors...

Making Alt key work in ITerm on Mac

Image
  Making the Alt Key Work in iTerm2 iTerm2 is a replacement for the default Terminal application on MacOS. It has many more handy features than Terminal , is free to download and is also open source 🎉. However, on first install, you can’t use the Option or Alt key (this key: ⌥ ) as you would in other applications: you can’t skip or jump over words by pressing Alt and the left or right keys. Instead you see sequences like [D or [C : With a little config, you can change this behaviour, which I’ll explain below. Note: I refer to the “Alt” key throughout this post, which is the text written on my old 2013 MacBook Pro keyboard, but this is normally called the “Option” key in MacOS. Open the “Preferences” menu: either find it in the “iTerm2” dropdown menu along the top of the screen or press the Cmd and comma keys. ⌘ + , Choose the “Profiles” menu. Select the “Keys” tab. Within the “Key Mappings” pane, find the mapping for the A...