Welcome to the Linux Foundation Forum!

Chap12: "spatial_size" parameter --> "canvas_size" from torchvision 0.16

Posts: 24
edited May 2024 in LFD273 Class Forum

(This post is just for your reference.)

In Chap12, some code snippets using "spatial_size" parameter of "BoundingBoxes subclass" get error of "TypeError". (My local environment uses torchvision 0.18.0,Colab uses 0.17.1+cu121 as of today)

According to release note, the parameter has changed its name to "canvas_size" from v0.16.0.

[transforms.v2] Renaming: BoundingBoxes.spatial_size -> BoundingBoxes.canvas_size (#7734)

This worked fine for me.

Comments

  • Posts: 7

    Hi @m.taniguchi

    Thank you for pointing this out. While the notebooks on GitHub are already updated to reflect this change from "spatial_size" to "canvas_size," we still need to update the code snippets accordingly.

  • Posts: 2,250

    Hi @m.taniguchi

    The code snippets have been updated.

    Thank you,
    Flavia
    Linux Foundation Training Team

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training