[support] Pytorch for Julia

Is there any Pytorch framework in Julia.


You can also just use


What were you planning on using Torch for? There might be Julia alternatives as well, such as Flux (deep learning) or Zygote (AD)


@baggepinnen, thanks but i want to use just Pytorch, because i am unfamlier to other

I think it is still important to know what is your intended use case in order for people to give you some advice. For example do you want to interface with some other Julia packages or just want to do standard DL?
If you have a strong wish to use just pytorch, why not just use pytorch directly from python?

1 Like

why not use Pytorch from julia?

Unfortunately, this is more of a philosophical question that doesn’t have one single answer. To keep this conversation going, I would strongly recommend that you describe more about your use-case, both in terms of what you want to use an ML framework like PyTorch for and where/why you’re looking to use Julia. “Why not?” doesn’t give us anything to work with :slight_smile:.

1 Like

As fast programming language, I wanted to use Julia instead of other :slight_smile: .

If you’re using Torch.jl, it just issues calls to PyTorch, which’ll be no faster than just using Torch directly. Julia’s speed is only gained within Julia itself - it’s not a magic wand capable of speeding up external libraries.


Sorry, I should have been more precise: what is the problem you’re trying to solve (e.g. identifying hot dogs vs non hot dogs) and what algorithms/methods are you planning to solve it with (e.g. resnet50 or some other deep computer vision model)? Some example code, papers and/or GitHub repos would help here.

I ask because Julia (at least currently) will not make your deep learning code faster unless you are working with some very specific algorithms. As @stillyslalom and others have mentioned, using Torch.jl or calling PyTorch from Julia using PyCall should not perform better than just using PyTorch from Python.



An expansion to the original question- can I use julia to do the heavy lifting (large nested loops for instance) and let pytorch handle the rest. My specific use case being nlp classification using skip grams, how do I use julia to run parts which involves calculation of losses, and accuracies - all of which use pytorch modules. In other words, I want julia to run a loop which calls a pytorch model and peform some analysis after that.
I’m working with Jupyter notebooks and searching for ways to integrate julia and python didn’t help much.

Would be great if someone share similar experiences or anything useful.

Cheers & thanks in advance.