How to install Keras and Theano in Anaconda Python on Windows

Install Anaconda

Is the leading open data science platform and is the recommended tool for use with Theano.  It is a free, easy to install python distribution and package manager that has a collection of over 720 open source package.  You can find a cheat sheet at the following location: Anaconda cheat sheet

  • Install Anaconda x64.
  • Open the Anaconda prompt

Conda is the Anaconda command line for managing packages.  We will be using this to install all the python related packages required. Before doing this we must ensure we have the most up to date version of Conda.  To do this type the following in the Anaconda prompt:

Next, we update Anaconda and all installed packages. To do this type the following in the Anaconda prompt:

Next, we install the packages required for Theano. To do this type the following in the Anaconda prompt:

Install Theano

Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.  To install the latest version of Theano type in the following in the Anaconda prompt:

Install Keras

Keras is a high-level deep learning library written in Python which runs on top of either  TensorFlowCNTK, or Theano.  It was developed so that developers can easily create convolutional and/or recurrent networks.  To install the latest version of Keras, type in the following in the Anaconda prompt:

 

Equivalent of Oracle PL/SQL TRIM function in SQL Server (T-SQL)

TRIM

In PL/SQL, when the TRIM function is called with just the data parameter it will strip the leading and trailing spaces.   You can accomplish the same functionality in t-sql by using two t-sql functions:  LTRIM (strips leading spaces) and RTRIM … [Continue reading]

Writing CSV files using CSVHelper package (C#, IEnumerable)

CSV

This is a follow-up on my post on how to read a CSV file using Josh Close’s CsvHelper.  CsvHelper is a fast and flexible .NET library for reading and writing CSV files. Below I will now show how to write CSV files … [Continue reading]

Insert data into new (or existing table) from another (T-SQL, PL/SQL, SQL Server, Oracle)

Often times we wish to copy data from one table into another.  The methods of doing this where the new table does not exist will be slightly different from the case in which it does exist.  Also I will show display the method of doing this in T-SQL … [Continue reading]

How to combine values from multiple rows of a single column (T-SQL, Microsoft SQL Server, FOR XML PATH, CSV ).

The Problem: I need a way to roll-up multiple rows into one row and one column.  In essence I needed to convert something that looked like this: [crayon-62be4a3188939192229318/] Into something that looks like this: The Solution: The … [Continue reading]

Run Transact-SQL Script Files Using sqlcmd–SQL Server T-SQL

Problem: I recently received a script which creates a database and loads data.  I was unfortunately too large for SQL Server Management Studio to process. Solution: You can use the sqlcmd utility to run the script file. The example below … [Continue reading]

How to delete duplicate records from your SQL Server tables – T-SQL

Duplicated Records

Below you will find two methods that can be used to remove duplicate records from you Microsoft SQL Server tables. Method 1: This method will only work in SQL Server 2005 and later; if you need to remove duplicates from an earlier version … [Continue reading]

How to create a blocking transaction in SQL Server – T-SQL (exclusive lock)

Excuse the odd topic.   I often like to experiment with SQL Server and create odd situations which we normally should be avoiding.  One of those things is creating SQL Statement which get blocked and creating a timeout.  One of the simplest ways to … [Continue reading]

About Me

[Continue reading]

Reading CSV files using CSVHelper package (C#, IEnumerable)

I have come across many times the need to incorporate the reading of CSV files in an application.  Below I will show how to use Josh Close’s CsvHelper to  import a CSV file which looks like the following (file will be included … [Continue reading]

%d bloggers like this: