Welcome to the Linux Foundation Forum!

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

Options
m.taniguchi
m.taniguchi Posts: 24
edited May 4 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

  • dvgodoy
    dvgodoy Posts: 6
    Options

    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.

  • fcioanca
    fcioanca Posts: 1,930
    Options

    Hi @m.taniguchi

    The code snippets have been updated.

    Thank you,
    Flavia
    Linux Foundation Training Team

Categories

Upcoming Training