Posts

Tensorflow - Simplest Gradient Descent using GradientDescentOptimizer

Below is the code to find the minimum possible value of weight (w) such that the outcome of equation is closest to 0, using Gradient Descent method. These weights are multiplied with input (x) to compute cost, thus minimizing it. The equation is below... w 2 - 10 w + 25 ---------------------- (i) i.e. ( w - 5 ) 2 Thus, the coefficients from (i) would be 1, -10 and 25 import numpy as np import tensorflow as tf coefficients = np.array([[ 1 ], [ - 10 ], [ 25 ]]) # try 1, -20, 100 -- line 4 w = tf.Variable([ 0 ], dtype = tf.float32) x = tf.placeholder(tf.float32, [ 3 , 1 ]) cost = (x[ 0 ][ 0 ] * w ** 2 ) + (x[ 1 ][ 0 ] * w) + x[ 2 ][ 0 ] # (w-5)^2 train = tf.train.GradientDescentOptimizer( 0.01 ).minimize(cost) init = tf.global_variables_initializer() with tf.Session() as session: session.run(init) print (session.run(w)) for i in range ( 1000 ): session.run(train, feed_dict = {x:coefficients}) print (session.run(w)) T

Baseline: Data, ML, AI https://www.qwiklabs.com/quests/34 - Tips

Baseline: Data, ML, AI https://www.qwiklabs.com/quests/34 Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab , shows how long Cloud resources will be made available to you. What you need Access to a standard internet browser (Chrome browser recommended). Dataprep : Qwik Start - GSP105 only runs on Chrome Time to complete the lab without pause Tips:   Open the tabs in separate windows, side-by-side . Accept the terms and conditions. Do NOT add recovery options or two-factor authentication (because this is a temporary account). Do NOT sign up for free trials. All the best with the quest!

MLConf Atlanta - Sep 2017 - 'A Machine Learning approach for detecting a Malware' - Talha Obaid

Image
Thanks MLconf for having me. Here is the recording of my talk at And the slides https://www.slideshare.net/SessionsEvents/talha-obaid-email-security-symantec-at-mlconf-atl-2017

Google GDG DevFest 2016 - Machine Learning 101 slides

https://drive.google.com/file/d/0B3bb7xB2VOUBQXhsb2hWaFVMU2pZdmE1bU9qSmNVTGptUTBJ/view

TeraTerm: Best Terminal Client on Windows

By Default Delete key won't work, as it is with version 4.72. To enable it, you need to DESELECT it. Its in the Setup->Keyboard->Transmit DEL by: Uncheck Delete Key

Windows equivalent of Linux's /etc/hosts

On Unix,  /etc/hosts  file contains mappings between an IP address and a name of the host. It overrides mappings from DNS.  Windows has an equivalent of this file: c:\WINDOWS\system32\drivers\etc\hosts Source  http://blog.kowalczyk.info/article/Local-DNS-modifications-on-Windows-etchosts-equi.html

Ubuntu Remote Desktop to Windows Server

Image
On your Ubuntu machine, open Terminal Server Client or tsclient, install if not available, using sudo apt-get install tsclient Try giving RDPv5. If unable to get through, you need to change the Terminal Server Settings on Windows Server 2003 R2 machine. Go to Control-Panel->Administrative Tools->Terminal Services Configuration->Connections->RDP-Tcp. Right click for properties. In General tab, under security frame, from the dropdown combo having Security Layer, select RDP Security Layer. If it have SSL, you may not be able to connect from Ubuntu machine, but would be able to go from Windows machine. Below is the snap