Skip to content

5.4.2 Visualizing Convnets Filters - Be careful about the code samples in the e-book #83

@wzhings

Description

@wzhings

About the sample codes in Section 5.4.2 - Visualizing the Convnets Filters (PP 170), if you write the exact codes as written in the e-book. Probably you cannot display those filter images correctly as displayed in the book. If the results are blank, please change the final line:
"plt.imshow(results)" into "plt.imshow(results.astype('uint8'))"

When I wrote these codes in Spyder, the interpretor reported some hints: "Clipping input data to the valid range for imshow with RGB data([0..1] for floats or [0..255] for integers". However, the type of "results" is float64. Therefore, please change the data type when you want to visualize these filters.

I was stuck by this errors for one night and felt frustrated. Hope you guys won't! Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions