Live data from Hacker News

PyTorch 1.0 is out

github.com

61–70 of 72 posts

Re: PyTorch 1.0 is out

#61
post #60

Hm, the Mac version of LibTorch is suddenly unavailable!? [0] I swear it was available for download until a few days ago... [0] https://pytorch.org/get-started/locally/

we are fixing this shortly. it was an oversight.

Edit: fixed links should be going live in a few mins, via: https://github.com/pytorch/pytorch.github.io/pull/141

Re: PyTorch 1.0 is out

#62
post #53

Earlier quoted context omitted.

Why do closures suck? What are they missing?

I like to pass closures as return values or as function parameters. In my experience this is folly in c++.

Here's an example of doing both:

  $ cat test.cpp
  #include 
  #include 

  template 
  auto pass_func(F func) {
    return func();
  }

  auto return_func() {
    std::string test = "Hello World!";
    return [=](){ return test; };
  }

  int main() {
    auto func = return_func();
    std::cout 
What's hard about it?

Re: PyTorch 1.0 is out

#63

Earlier quoted context omitted.

Wow, that’s actually really awesome. I really missed a good languages-other-than-Python story in Tensorflow. Now I feel a little inspired to try out ML again...

I’m really excited to use it in C++. When it’s in Python, it becomes much harder to embed into other programs and is susceptible to Python version issues when sharing code. This reduces barriers to use in addition to improving performance and portability.

I’m also excited that Caffe got merged in because it has nearly perfect GPU-scaling via MPI, whereas tf suffers (or did, when [0] came out) with more GPUs.

[0] https://arxiv.org/pdf/1711.05979

Re: PyTorch 1.0 is out

#64
post #27

Earlier quoted context omitted.

I love PyTorch, but my experience with jits embedded in Python (eg. Numba) has been everything but simple, nevermind trivial. I'll really have to try it to believe it.

I’ve had the opposite experience with numba in production. It works almost flawlessly, very easy to reason about the generated code and inspect annotations, easy to debug.

Check out github.com/google/jax, it’s NumPy on the GPU with automatic differentiation, JIT and autobatching.

Re: PyTorch 1.0 is out

#65
post #7
post #6

The new JIT is very interesting. Anyone know if this is for inference only or also for training?

training and inference.

Can you actually train a torch::jit::script::Module? I couldn't figure out how to feed its parameter tensors to a torch::optim::OptimizerBase constructor...

Re: PyTorch 1.0 is out

#66
post #64

Earlier quoted context omitted.

I’ve had the opposite experience with numba in production. It works almost flawlessly, very easy to reason about the generated code and inspect annotations, easy to debug.

Check out github.com/google/jax, it’s NumPy on the GPU with automatic differentiation, JIT and autobatching.

That’s very cool. Numba and Cython work extremely well with virtually no overhead or extra effort on my part, so jax doesn’t seem like it would buy me much for most of my work. But I can imagine a lot of projects where jax woukd be useful, and I plan to keep current on best practices for it.

Re: PyTorch 1.0 is out

#67

Earlier quoted context omitted.

I'm hoping that this results in a nice, high-level API for https://github.com/fragcolor-xyz/nimtorch as well, which AFAIK has been wrapping the low-level Aten API. I've been keeping my eye on that project, and been really excited about it.

Likewise, I hope this leads to a nice wrapper API for Julia.

Sure, but Julia doesn't need it: https://julialang.org/blog/2018/12/ml-language-compiler

Re: PyTorch 1.0 is out

#68
post #53

Earlier quoted context omitted.

I like to pass closures as return values or as function parameters. In my experience this is folly in c++.

Here's an example of doing both: $ cat test.cpp #include #include template auto pass_func(F func) { return func(); } auto return_func() { std::string test = "Hello World!"; return [=](){ return test; }; } int main() { auto func = return_func(); std::cout What's hard about it?

You didn't pass a function to std::cout, you called it and passed its return value.

Re: PyTorch 1.0 is out

#69

Earlier quoted context omitted.

Here's an example of doing both: $ cat test.cpp #include #include template auto pass_func(F func) { return func(); } auto return_func() { std::string test = "Hello World!"; return [=](){ return test; }; } int main() { auto func = return_func(); std::cout What's hard about it?

You didn't pass a function to std::cout, you called it and passed its return value.

The way I interpret the GP, they're talking about passing closures as a function argument. In the example I pass func (a closure) to pass_func. Not sure what std::cout has to do with it?

Re: PyTorch 1.0 is out

#70

Earlier quoted context omitted.

You didn't pass a function to std::cout, you called it and passed its return value.

The way I interpret the GP, they're talking about passing closures as a function argument. In the example I pass func (a closure) to pass_func. Not sure what std::cout has to do with it?

Sorry, I misread the code.
Post reply on HN