Posts

Showing posts with the label HowTo

How to setup an eGPU on Ubuntu for TensorFlow

Image
I remember when I read about eGPUs for the first time. The symbiosis of having a light weight laptop at university or on the go, but still having a desktop like power horse when having some spare-time at home sounded like a dream. But everything faded into obscurity because I almost lost full interest into gaming the last years. But this changed, since I'm spending a lot of time in deep learning since about two years. And it's well known that taking advantage of a GPU boosts training time by a huge margin. That's why I tried to get access to a high-performance graphics card in order to be able to train non-trivial networks and so some more serious research. At first, I had a look at some offers in the cloud. I did not try out a GPU-enabled instance on AWS, because the use a billing based on a hourly rate. This means that you have to pay for a full hour, even when you just run a simple example for 1 minute. Next, I checkout out the 300$ free credit on Google compute engi...

Why should I install TensorFlow from Source?

There are various ways to install TensorFlow. For instance, you can install it using a Docker image or Python's package manager pip. But since the version 1.0 release of TensorFlow, you probably might have faced the following warnings each time you run a TensorFlow session: 2017-05-29 11:50:22.977500: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 11:50:22.977513: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 11:50:22.977517: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 11:50:22.977519: W tenso...

Python + Matplotlib = Must Have on Every System

Image
In the last few weeks, I had to visualize some data from time to time. And for me, it turned out that the Python library Matplotlib is one of the best tools to do some quick plots. I cannot imagine that I have never installed Python on the Windows partition of my laptop, but only on my Linux partition. And I can really recommend to have Python and Matplotlib installed on every device, so that you have these tools at hand whenever you need to visualize some data. In this short post, I would like to write down the few simple steps you should do... 1. Install Python from Python Software Foundations Make sure you add python to your PATH , as well as select pip to be installed as well 2. Start your terminal, cmd or PowerShell 3. Install Matplotlib using the pip > pip install matplotlib 4. Start the python console > python 5. Import matplotlib.pyplot and make a plot with just a few lines of code > import matplotlib.pyplot as plt > plt.plot([8,4,2,1,0,1,2,4,8]...

WAV Sounds in MonoGame

Image
Bei der Portierung meines erstes Games von XNA nach MonoGame machte das Abspielen einiger Soundeffekte etwas Schwierigkeiten. So ließen einige Sounds im WAV-Format ohne Probleme abspielen, einige führten zu massiven Performance-Problemen und andere gaben keinen Ton von sich beziehungsweise warfen eine entsprechende Exception. In XNA dagegen lassen sich diese betroffenen Soundeffekte problemlos abspielen. Beim Blick in die Foren von MonoGame sieht man schnell, dass ich nicht der einzige bin, der mit diesen Problemen zu kämpfen hatte. Nach dem analysieren meiner WAV-Files ist mir dann aufgefallen, dass alle Sounddateien mit einer Bitrate von 705bit keine Probleme lieferten. Somit versuchte ich mit entsprechenden Tools alle anderen Soundeffekte auf diese Bitrate zu konvertieren. Und siehe da: Sie ließen sich plötzlich ohne Probleme abspielen! Wie ich die WAV-Files konvertiert habe, möchte ich im folgenden kurz erläutern. Verwendet habe ich dazu das kostenlose Tool Audacity . WAV-Dat...

HowTo: Lokalisierung einer Windows Phone 7 App

Image
Wenn man sich die Bewertungen der User im Windows Marketplace einmal genau anschaut, findet man oft Kommentare wie “Sehr schöne App, nur leider auf English” oder “Hoffentlich kommt bald ein Update für deutsche Sprache” . Man bekommt fast den Anschein, eine App zu lokalisieren sein ein aufwändiges Feature. Ist es aber nicht! Dieses HowTo zeigt euch wie es geht… 1. Vorbereitungen In dieser Anleitung verwende ich das Standard Windows Phone Application Template von Visual Studio 2010. 2. Definition der Standardsprache In den Projekteigenschaften stellt man unter Application > Assembly Information… die Standardsprache ein. In meinem Fall wähle ich hier German (Germany) [entspricht de-DE]. 3. Anlegen der Ressourcen Dateien Als nächstes werden die Ressourcen für die Sprachen angelegt. Am besten legt man dazu einen neuen Ordner an und fügt über Add > New Item… > General > Resources File zwei Ressourcen hinzu. Bei der zweiten Ressource muss man als zusätzlich noch das K...

HowTo: Erstellen eines WCF RIA Service für WP7

Image
Um beispielsweise mit dem Windows Phone auf eine Datenbank zugreifen zu können, wird ein WebService benötigt. Die Erstellung eines solchen Services ist nicht sehr aufwändig, da vieles im Hintergrund generiert wird. Folgend ein kleines HowTo. 1. Erstellung des Models mit dem EntityFramework Öffnet Visual Studio und erstellt zunächst ein leeres ASP.NET Projekt . Fügen Sie dem Projekt anschließend ein ADO.NET Entity Data Model hinzu, zu finden im Bereich Data . Wählen Sie dort Generate from Database und wählen dann im darauf folgenden Schritt die gewünschte Datenbank aus. In meinem Fall habe ich hier die NorthwindOA-Datenbank gewählt. Selektieren Sie dann die gewünschten Tabellen, auf die später unsere kleine Windows Phone App zugreifen soll. Nach einem Klick auf Finish werden anschließend alle Entitäten vom Entity Framework generiert und als Diagramm dargestellt. Jetzt ist es erforderlich, ein Build durchzuführen. Wird haben nun unser fertiges Model. 2. Erstellung...