秋天好 | Autumn is good

Do you like fall?  We talked about autumn (qiū)(tiān) in this weekend’s Chinese lesson.

(qiū)(tiān)(dào)(qiū)(tiān)(hǎo)
(lán)(lán)(tiān)(kōng)白(bái)(yún)飘(piāo)
(bǎo)(bǎo)(tái)(tóu)(hā)(hā)(xiào)
magic math mandarin

Fall is here.  Fall is good.
Blue sky and white clouds.
The baby looks up and laughs.

Besides 中文, we are also working with other organizations to help children with computer programming 编程.

极客星晨少儿编程

API

Yes, this is still a Magic Math Mandarin blog–but to have tomorrow’s skills means a lot more than just knowing basic math.
API = plugin

This post is a quick note (updates are in progress).

Site that documents most APIs
https://www.programmableweb.com/
More

Git and Github

Q: What is git?
A: It is a digit without di 🙂   Git is currently the best (commonly used) tool for version control 目前最好的版本控制系统.
Motivation

Github can be used for your own code version control by mirroring the code of a folder in your own computer. It enables version control and has workflow capabilities.   Note: if you just want syncing, use Dropbox; git and Github can be a bit confusing.
More

TensorFlow and many ways to use it | TensorFlow人工智能系统

What is TensorFlow?    Since the best way to learn anything is to first draw upon what we already know, and then to practice.   Let’s start with what it looks like to things we already know, and then what is unique about it.

Relating to the old (or something we already knew): from its design, TensorFlow has something in common with kids’ programming environment Scratch and data mining tool such as SAS Enterprise Miner: all of them use graph to represent a process, and nodes/modules to represent specific blocks of functions, without having to write a ton of code.

SCRATCH

SCRATCH

SAS Enterprise Miner

SAS Enterprise Miner Project Flow Graph

Although not a drag-and-drop as Scratch, SAS EM,  TensorFlow does operate in similar way in that you define the graph of the process before any numerical computation is done.  According to Google (GCP), “With TensorFlow, you don’t need to be knowledgeable about the advanced math models and optimization algorithms needed to implement deep neural networks. Just download the sample code and read the tutorials and you can get started in no time. The library lowers the barrier to entry for machine learning significantly.” This has been what Scratch, SAS Enterprise Miner, Alteryx and other GUI have done for their specializations.

TensorFlow graph for a simple linear regression from my computer

TensorFlow graph for a simple linear regression from my computer

Why it is so special

There are many other great libraries that help facilitate deep learning as well.  TensorFlow is special because it is developed and maintained by Google, and it has more pros than other libraries.   Google gives it away because Google believes it will have more value if more people uses it.

One of many cool things showcased at Google TF 2017 Developer Summit is a project that detects eye disease based on the same technology that identifies cats from pictures.  What is special is that TF allows the project to focus more on solving the problem than figuring out all the code.

tensorflow detect eye disease

TensorFlow-based project that detects eye disease from images

On Github TensorFlow is one of the most starred repos, where there are many exciting resources and examples getting developed each day.

https://github.com/sherrym/tf-tutorial/blob/master/1_linear_regression_model.ipynb

https://github.com/sherrym/tf-tutorial/blob/master/2_mnist.ipynb

  • Repository of models: https://github.com/tensorflow/models

Before watching the tutorial or reading example code, it would be better to have TensorFlow installed so that you can learn by doing instead of just watching.

copyright Magic Math Mandarin

I need to start the virtual enviroment, by typing “activate universe” at the command prompt. Then type “tensorboard –logdir=graphs”. Then follow the address provided by tensorboard on the command prompt, which says “http://IBM-THINK:6006”, not “http://localhost:6006”. This was successful.

tensorboard on Magic Math Mandarin

When I ran a different model but with the same graph folder, then I need to delete all contents in graph before running the different model.  Otherwise the graph stays in the old one while information in some other tabs of TensorBoard may change.

tensorboard on Magic Math Mandarin

Python for fun 4


Today we work on animation with hundreds of triangles, balls, squares and vickies (you can call the shapes anything you like).   Shapes are defined by coordinates (x,y).   A huge improvement over last time is that we use a loop to add shape to lists of shapes.
More

Setting up Python after installing (or re-installing) Anaconda

Everyone of us (adult Python users at least) need to install or re-install Python or the one with Anaconda. Today I had to re-install everything related to Python due to trouble getting Tensor Flow started.   I primarily use Windows 10.  Below steps may serve some who are going through this.
More

Super useful command line 超有用的命令行

One thing I wish I learned long time ago is the command line interface 命令行界面 (CLI) or shell (Linux) or terminal (OS).  Using the command line is much faster/powerful than using mouse as it works closer to the computer machine than icon-based drag and drop, and certain tasks can only be done through the command line (and not the GUI).

For Windows users there is a great tool called PowerShell, which recognizes different alias for the same command from different systems (e.g. it understands ls to mean the same as dir). Its ISE version provides a colorful editing environment with intelligence.

More