Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Welcome to TorchSharpExamples Discussions! #1

Discussion options

👋 Welcome!

We’re using Discussions as a place to connect with other members of our community. We hope that you:

  • Ask questions you’re wondering about.
  • Share ideas.
  • Engage with other community members.
  • Welcome others and are open-minded. Remember that this is a community we
    build together 💪.

To get started, comment below with an introduction of yourself and tell us about what you do with this community.

You must be logged in to vote

Replies: 2 comments

Comment options

Does anyone know if there are examples of creating an LSTM model with TorchSharp? Thanks!

You must be logged in to vote
0 replies
Comment options

Hi! - new here. I've been using F# for ~ 20 years and NNs mainly with Keras / Python due to frustration with the .net libs for keras. A few people recommended PyTorch and TorchSharp in particular, and I was setting up a new machine from scratch so I thought it would be a good chance to give it a try.

First a compliment - the OOTB install experience was light night and day vs previous libraries. You've all done a wonderful job of packaging the nightmare combination of drivers needed to get CUDA running. It was all installed first try. I'm working my way through the tutorials. I had a couple of quick , probably dumb questions but I wanted to share while I'm still naive to the right way to to things. I like to cut and paste a hello world example, get it working and then modify it to build what I want.

Right now I'm trying to build a quick and dirty multi layer linear model (nothing fancy), and I started with the MNIST example since I am familiar with the keras equivalent. The really naive - paste the core code into a .fs file, add the headers and deps failed. The let hasCUDA = TorchText.Datasets.cuda_is_available() couldn't find the TorchText namespace and I eventually worked out it was part of the example infrastructure, and C# library dependency if I'm reading things properly. Is there a simple F# only solution for this step - it looks like something I'm going to want in every script and I'm trying to keep the core boilerplate as contained as possible (I often do this type of thing in just a single .fsx script). For now I just hard coded the answer to yes ;) to get it running.

The second question was whether the class / object as model is mandatory or if it works to just build up the net and use it. Maybe there's a drawback to not having an underlying object, but that feels more complicated than needed. I might just be unfamiliar with pytorch idioms thoughs, so apologies if I'm missing the point. I'll keep playing with it, but would be happy to move over to using this as my main deep learning workhorse. Thanks in advance,

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /