New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confused about types #7
Comments
PyTorch has a separate internal representation for scalars (0 dimension tensors) and tensors - the ocaml types for these are respectively Tensor.arange1 ~start:(Scalar.int 0) ~end_:(Scalar.int 5) ~options:(Int, Cpu);; Let me know if you have any further issue using this. |
I see. So what does Also, would it be possible to put up the odoc documentation on a github.io page? |
Also:
And this library needs documentation. But I'm sure you know that :) |
Sorry for bombarding with questions here, but I don't know where to do so. Feel free to drop by the ocaml discord if you want to discuss more, or if you even want a channel for discussing this library. How would one iterate over a tensor the same way as you do in pytorch? I feel like there should be a |
|
Hello and don't mind me asking, but shouldn't this: |
Indeed that's what's expected as per the pytorch doc. You can also use |
ohh I see, I see, you must add Tensor.print to actually get output :D |
Indeed, |
Thanks for the answers! I understand the design decisions now. Thank you for doing this -- it's definitely the closest we can come to having state of the art deep learning in OCaml. BTW do you know of a good visualization solution? That's the other missing piece of the puzzle, and I don't think there's a clean way to interface with matplotlib. |
No problem, these bindings are quite close to the underlying C++ api, they could certainly use a more 'ocamlish' layer on top. |
Nice! So pyml works well for this kind of stuff? I'll try to play around with your library, and add stuff as needed. |
Yes pyml should work fine for this. You can even get it to work in a notebook by setting the matplotlib backend to agg, saving the image to say /tmp/a.png and loading it with |
@bluddy do you have any more issue ? I'll close the issue in a couple days if not. |
No I'm good. I'll close it. |
I think this should work:
But I get
The text was updated successfully, but these errors were encountered: