In [1]:

    import numpy as np
    import theano
    import theano.tensor as T
    import theano.d3printing.d3printing as d3p

    %load_ext autoreload
    %autoreload 2

    Couldn't import dot_parser, loading of dot files will not be possible.

In [2]:

    # Logistic regression model
    num_in = 64**2
    num_out = 10
    W = theano.shared(np.random.randn(num_in, num_out), name='W', borrow=True)
    b = theano.shared(np.random.randn(num_out), name='b', borrow=True)
    X = T.dmatrix('X')
    y = T.nnet.softmax(X.dot(W) + b)
    pred = y > 0.5

In [3]:

    d3p.d3print(y, 'logreg_y.html')

    The output file is available at logreg_y.html

open

In [4]:

    d3p.d3print(pred, 'logreg_pred.html')

    The output file is available at logreg_pred.html

open