How to use the d2l.use_svg_display function in d2l

To help you get started, we’ve selected a few d2l examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eric-haibin-lin / AMLC19-GluonNLP / 01_gluon_basics / mlp_utils.py View on Github external
def show_fashion_mnist(images, labels):
    import d2l
    d2l.use_svg_display()
    # Here _ means that we ignore (not use) variables.
    _, figs = d2l.plt.subplots(1, len(images), figsize=(12, 12))
    for f, img, lbl in zip(figs, images, labels):
        f.imshow(img.reshape((28, 28)).asnumpy())
        f.set_title(lbl)
        f.axes.get_xaxis().set_visible(False)
        f.axes.get_yaxis().set_visible(False)