Skip to content

Question: What is the best practice for working with PyTorch? #533

@famura

Description

@famura

Hi PyJulia team,

I'm just getting started with porting a Julia package to a Python module. On the Python side, all the interaction will be with PyTorch tensors.

I noticed that one can pass numpy arrays and lists to Julia, which will then be cast to the built-in Array type. AFAIK, this is not possible with PyTorch tensors. A simple workaround would be to convert the tensors from torch to numpy (and the reverse). However, I am curious if there is a more elegant way. How can I control this mapping?

Best regards,
Fabio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions