yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


Author Archive

Download CuDNN v6.0 RC

Written by iassael on 20/02/2017. Posted in computing

You can download cudnn v6.0 using the following command:

wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/cudnn-8.0-linux-x64-v6.0-rc.tgz

  • Continue Reading
  • 3 Comments

AzureRM PowerShell Mac OS X

Written by iassael on 10/02/2017. Posted in computing, macosx

I recently had to install Powershell on my Mac (sigh) (bigger sigh) and I run into issues by trying to get AzureRM to work. Among others:

Login-AzureRmAccount : The ‘Login-AzureRmAccount’ command was found in the module ‘AzureRM.profile’, but the module could not be loaded. For more information, run ‘Import-Module
AzureRM.profile’.
At /Users/iassael/Drive/Code/projects/azure/BulkAddAAD.ps1:5 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Everything can be resolved by installing AzureRM from here:

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
Login-AzureRmAccount

PS. Import-Module would have to be rerun every time powershell is restarted.

  • Continue Reading
  • No Comments

Learning to Communicate with Deep Multi-Agent Reinforcement Learning

Written by iassael on 02/09/2016. Posted in machine learning

learning to communicate We consider the problem of multiple agents sensing and acting in environments with the goal of maximising their shared utility. In these environments, agents must learn communication protocols in order to share information that is needed to solve the tasks. By embracing deep neural networks, we are able to demonstrate end-to-end learning of protocols in complex environments inspired by communication riddles and multi-agent computer vision problems with partial observability. We propose two approaches for learning in these domains: Reinforced Inter-Agent Learning (RIAL) and Differentiable Inter-Agent Learning (DIAL). The former uses deep Q-learning, while the latter exploits the fact that, during learning, agents can backpropagate error derivatives through (noisy) communication channels. Hence, this approach uses centralised learning but decentralised execution. Our experiments introduce new environments for studying the learning of communication protocols and present a set of engineering innovations that are essential for success in these domains.

Github: https://github.com/iassael/learning-to-communicate
arXiv: https://arxiv.org/abs/1605.06676

  • Continue Reading
  • No Comments

Google Drive Automatically Clean Trash

Written by iassael on 31/08/2016. Posted in computing, general

2015-01-31_06-57-03
Solution to avoid scrolling down and deleting files; automatically clean your Google Drive’s trash.

https://github.com/iassael/google-drive-trash-cleaner

  • Continue Reading
  • No Comments

Batch-Normalized LSTM for Torch

Written by iassael on 16/04/2016. Posted in computing, machine learning

Recurrent Batch Normalization

Batch-Normalized LSTMs

Tim Cooijmans, Nicolas Ballas, César Laurent, Çağlar Gülçehre, Aaron Courville

http://arxiv.org/abs/1603.09025

Usage

Clone from: https://github.com/iassael/torch-bnlstm

local rnn = nn.LSTM(input_size, rnn_size, n, dropout, bn)

n = number of layers (1-N)

dropout = probability of dropping a neuron (0-1)

bn = batch normalization (true, false)

Example

https://github.com/iassael/char-rnn

Performance

Validation scores on char-rnn with default options

bnlstm_val_loss

 

  • Continue Reading
  • No Comments

Open Python 2 Pickle in Python 3

Written by iassael on 30/03/2016. Posted in computing

Opening a pickle from Python 2 in Python 3 will probably result either:

TypeError: 'str' does not support the buffer interface

or

UnicodeDecodeError: 'ascii' codec can't decode byte 0xab in position 0: ordinal not in range(128)

to solve that you can just use the following code setting the defualt encoding:

import pickle
import gzip
import numpy as np
with open('var/python2pickle.pkl', 'rb') as f:
    data = pickle.load(f, encoding='latin1')
    print(data)

  • Continue Reading
  • No Comments

OpenMP for Mac OS X El Capitan (Torch7)

Written by iassael on 14/03/2016. Posted in computing, machine learning, macosx

Having followed a plethora of guides to achieve proper OpenMP support on OS X, this is how it can be done:

  1. Install Homebrew
  2. run “brew update” (don’t skip that 🙂 )
  3. run “brew install clang-omp”
  4. add the following lines to ~/.profile
    export PATH=/usr/local/bin:$PATH

    # CLANG-OMP
    export CC=clang-omp
    export CXX=clang-omp++

    # Brew Libs
    export C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH
    export CPLUS_INCLUDE_PATH=/usr/local/include:$CPLUS_INCLUDE_PATH
    export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
    export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH

  • Continue Reading
  • No Comments

“MKL library not found” Torch7

Written by iassael on 01/03/2016. Posted in machine learning

Installing Torch with MKL support can be tricky. I had installed MKL (or Parallel Studio XE) and still Torch installation was not detecting MKL. After a long caffeinated night I found that the problem relies on the lib and include paths of CMAKE. So, given that you have already added that to your .bashrc (Ubuntu Linux) / .bash_profile (MacOSX):

. /opt/intel/bin/compilervars.sh intel64

Then all you need to do for Ubuntu is:

export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/opt/intel/compilers_and_libraries/linux/include:/opt/intel/mkl/include
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/opt/intel/compilers_and_libraries/linux/lib/intel64:/opt/intel/mkl/lib/intel64

and for MACOSX:

export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/opt/intel/compilers_and_libraries/mac/include:/opt/intel/mkl/include
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/opt/intel/compilers_and_libraries/mac/lib:/opt/intel/mkl/lib
  • Continue Reading
  • 1 Comment

mosh: Nothing received from server on UDP port 60001.

Written by iassael on 29/01/2016. Posted in computing

The most probable fix if you are receiving this error is:

sudo iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT
  • Continue Reading
  • No Comments

Totally remove TimeMachine Backups.backupdb

Written by iassael on 19/09/2015. Posted in computing, macosx

To avoid command line errors with a simple sudo you have to run the following command:

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass rm -rfv /Volumes/[disk]/Backups.backupdb/

replacing [disk] with your drive’s name.

  • Continue Reading
  • No Comments
  • 1
  • 2
  • 3
  • 4
  • 5