Git Product home page Git Product logo

Comments (2)

KeironO avatar KeironO commented on July 22, 2024

To any researchers reading this, sleep is important. Go take a nap.

So, turns out that this was a very silly question.

Here's a horrible hacky way of doing it for now, I'll work on something better - soonish.

def visualise_first_layer(model, convout1, test_data):
    get_layer_output = K.function([model.layers[0].input], [convout1.get_output(train=False)])
    layer_output = get_layer_output([test_data])[0]

    f, (ax1, ax2, ax3, ax4, ax5, ax6) = plt.subplots(1, 6, sharey=True)
    ax1.imshow(layer_output[0,0,1,:])
    ax2.imshow(layer_output[0,10,1,:])
    ax3.imshow(layer_output[0,20,1,:])
    ax4.imshow(layer_output[0,30,1,:])
    ax5.imshow(layer_output[0,40,1,:])
    ax6.imshow(layer_output[0,50,1,:])

    plt.show()

from keras-extra.

KeironO avatar KeironO commented on July 22, 2024

Bit of a better approach here.

def visualise_first_layer(model, convout1, test_data):
    get_layer_output = K.function([model.layers[0].input], [convout1.get_output(train=False)])
    layer_output = get_layer_output([test_data])[0]

    for i in range(layer_output.shape[1]):
        p = plt.imshow(layer_output[0,i,1,:])
        plt.pause(0.1)

This should display the features from each timeframe sequentially using a single window - I guess you could call it a slide show.

from keras-extra.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.