Skip to content
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

Suggestions for more examples #266

Open
NiklasGustafsson opened this issue May 25, 2021 · 6 comments
Open

Suggestions for more examples #266

NiklasGustafsson opened this issue May 25, 2021 · 6 comments
Labels
documentation Documentation

Comments

@NiklasGustafsson
Copy link
Contributor

I received these suggestions from @GeorgeS2019 via email:

https://github.com/Apress/pytorch-recipes

https://github.com/Apress/pytorch-recipes/blob/master/Torch_AI_7.ipynb

Has a few NLP examples to “complete” your torchsharp examples
• 7.1 Word Embedding
• 7.2 Continuous bag of words (CBOW)
• 7.3 LSTM Model

@imjwang
Copy link

imjwang commented Jun 15, 2021

an example for loading and running torchscript models for mobile android/ios inference would be great

@NiklasGustafsson
Copy link
Contributor Author

@imjwang, do you mean a model that has been built using Pytorch and TorchScript, loaded with .NET, or do you mean training and producing the model using .NET, then exporting to native code via TorchScript?

@imjwang
Copy link

imjwang commented Jun 15, 2021

the former, a pretrained model that has already been exported to .ts or .pt

@GeorgeS2019
Copy link

GeorgeS2019 commented Jun 15, 2021

PyTorch for Deep Learning: Creating and Deploying Deep Learning Applications

import spacy
import torchtext
import pandas as pd
import torch.nn as nn
import torch.optim as optim
from torchtext.legacy import data
import IPython.display as display
import librosa
import librosa.display
import matplotlib.pyplot as plt
import numpy as np
import random
import torch
import torchaudio
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from pathlib import Path
from PIL import Image
from torch.utils.data import Dataset
from torchvision import models, transforms
import torch
import torch.nn as nn
import torch.utils.data
import torchvision
from functools import partial
from torch import optim
from torch.utils.tensorboard import SummaryWriter
from torchvision import datasets, transforms

@imjwang
Copy link

imjwang commented Jun 15, 2021

I have Pytorch experience, but am completely new to Xamarin, C#, and .NET
eg. I'm still trying to figure out how to correctly import Torchsharp to a Xamarin cross-platform mobile project after installing the nuget package.
So any basic Xamarin and C# examples like what @GeorgeS2019 suggested would help tremendously.

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation
Projects
None yet
Development

No branches or pull requests

3 participants