<s> import os <EOL> import sys <EOL> import argparse <EOL> import numpy as np <EOL> import theano <EOL> homepath = os . path . join ( '<STR_LIT:..>' , '<STR_LIT:..>' ) <EOL> if not homepath in sys . path : <EOL> sys . path . insert ( <NUM_LIT:0> , homepath ) <EOL> from dlearn . visualization import show_channels <EOL> from dlearn . utils . serialize import load_data <EOL> from scipy . io import loadmat <EOL> W = loadmat ( '<STR_LIT>' ) [ '<STR_LIT>' ] <EOL> M = load_data ( '<STR_LIT>' ) <EOL> import matplotlib . pyplot as plt <EOL> from mpl_toolkits . axes_grid1 import AxesGrid <EOL> from skimage . color import lab2rgb <EOL> fig = plt . figure ( ) <EOL> grid = AxesGrid ( fig , <NUM_LIT> , <EOL> nrows_ncols = ( <NUM_LIT:4> , <NUM_LIT:8> ) , <EOL> axes_pad = <NUM_LIT:0.0> , <EOL> share_all = True ) <EOL> for r in xrange ( <NUM_LIT:4> ) : <EOL> for c in xrange ( <NUM_LIT:8> ) : <EOL> ind = r * <NUM_LIT:8> + c <EOL> I = W [ ind ] <EOL> for i in xrange ( <NUM_LIT:3> ) : <EOL> I [ i ] += M [ i ] . mean ( ) <EOL> I *= <NUM_LIT> <EOL> I [ <NUM_LIT:0> ] += <NUM_LIT> <EOL> I [ <NUM_LIT:0> ] = ( I [ <NUM_LIT:0> ] - I [ <NUM_LIT:0> ] . min ( ) ) / ( I [ <NUM_LIT:0> ] . max ( ) - I [ <NUM_LIT:0> ] . min ( ) ) * <NUM_LIT> <EOL> I = np . rollaxis ( I , <NUM_LIT:0> , <NUM_LIT:3> ) <EOL> I = I . astype ( '<STR_LIT>' ) <EOL> I = lab2rgb ( I ) <EOL> grid [ ind ] . imshow ( I ) <EOL> grid . axes_llc . get_xaxis ( ) . set_ticks ( [ ] ) <EOL> grid . axes_llc . get_yaxis ( ) . set_ticks ( [ ] ) <EOL> plt . show ( ) </s>
