Comments (3)
Here are my thoughts:
- native function: yep and it's a must, because all operators are defined at this level and some of them not exposed in the next two levels. e.g. non "nn" ops, custom ops
- nn functional: nice to have and we should do it, the binding can save us a lot of works of reimplementing the logic with native functions in go.
- nn.module: nice to have but it's probably hard, because we need to make sure they interact well with go level
torch.Module
. e.g. In a model with mixed c++ module (exposed through the binding) and gotorch.Module
, how do we serialize them? if a c++ module takes another module as input (e.g. Sequential), how can we pass a gotorch.Module
to c++?
from gotorch.
Thanks for all the kindly reminders and suggestions! @bddppq
BTW, is it that
- nn.module and nn.functional are all based on nn.function?
- is https://github.com/pytorch/xla an alternative implementation of nn.function?
If so, is that we can have gotorch.nn and gotorch.nn.functional just like PyTorch, as long as they all call native functions, and in the future, we can simply replace the implementation of native functions to use https://github.com/pytorch/xla?
from gotorch.
We are now clear that we need to migrate three layers from PyTroch to GoTorch:
native functions
: https://github.com/wangkuiyi/gotorch/blob/develop/doc/wrap_native_functions.md- Functionals in
torch.nn.functional
and Modules intorch.nn
: https://github.com/wangkuiyi/gotorch/blob/develop/doc/develop_functionals_and_modules.md
from gotorch.
Related Issues (20)
- A magic number HOT 1
- runtime.LockOSThread() reduce throughput heavily
- Image preprocessing pipeline HOT 2
- Implement PreFetcher to Increase ImageLoader Throughput HOT 2
- A minimal C++ example to reproduce the problem in #273 HOT 2
- Use the Homebrew version of libtorch on macOS
- torch.GC may hang with a data loader cache
- Wrap BuildIndexVocabulary into a command-line tool
- GoCV decoder skipped some JPEG image in imageloader HOT 2
- ImageLoader shuffle samples at the begging of every each epoch
- Support data parallelism with a GPU cluster HOT 4
- gotorch can load pytorch models? HOT 11
- Unable to install go torch, including windows and ubuntu HOT 2
- Random errors in mnist
- 两年木有更新还能用吗 HOT 2
- Do we support Embedding LSTM GRU Transformer Attention Layers for NLP?
- Cannot build cgotorch on Macbook M1 (arm64) system HOT 1
- Suitable for deployment?
- go get is not working HOT 1
- gotorch.Tensor to gocv.Mat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotorch.