Comments (4)
IMHO we should closely follow python here. Ie if a method exists in Python it should also exist in R.
x$t()
exists in R the side:
> x <- torch_randn(10, 5)
> x$t()
torch_tensor
1.5990 -1.2676 1.4600 -0.6393 -0.8593 1.0309 0.4477 1.0159 0.0463 0.0362
2.1157 0.7238 0.0673 0.7179 0.1117 -1.0217 -2.2464 0.0867 1.2638 -0.7934
-1.2125 -1.0230 -0.0952 -1.1130 0.2201 -0.3773 0.5066 -0.8243 -0.3650 -0.2140
-0.2426 0.0644 0.2774 -0.9705 1.0606 -1.2880 0.8776 -0.4154 0.1012 -1.9847
-0.6819 -0.0620 -1.3663 -1.2802 0.7495 -0.3198 -1.4872 -0.9426 1.0952 0.2087
[ CPUFloatType{5,10} ]
clone
is a special case, because it was not possible to add a clone
method to an R6 class.
so we renamed it to copy
. We should be able to call it clone
again, since we are no longer using R6 classes for tensors.
from torch.
Oh, I completely agree! Perfect. Yes, then it'd be nice to have a clone
as well!
Why I thought there was no x$t()
:
t$mm_(t$t())
Error: attempt to apply non-function
(but tbh I didn't investigate)
from torch.
I think in this case, mm_
is the one that doesn't exist.
from torch.
oh, right - it really does not exist (in Python) :-)
Closing this and opening a separate one for clone
:-)
from torch.
Related Issues (20)
- upload the torch to the aws lambda layer HOT 1
- Moderate dimensionality (more than 128) leads to fatal error for nn_linear and nnf_linear HOT 3
- [liblantern CPU compilation ubuntu 22 ] leads to liblantern.so: undefined symbol: HOT 2
- Cannot save any torch tensor or `nn_module` HOT 4
- Release torch 0.12.0
- dataset subset introducing NAs by coercion HOT 1
- cloning nn_module changes type of object
- torch_device errors in latest builds HOT 4
- Cloning of torch module behaves unexpectedly HOT 3
- `nnf_prelu()` fails on MPS device with `Error Placeholder storage has not been allocated on MPS device!` HOT 1
- Question about NEWS HOT 1
- nnf_multi_head_attention_forward (indices) HOT 1
- Calling `$detach()` discards attributes HOT 2
- plans to support cuda 12.3? HOT 2
- torch_arange() inconsistent with PyTorch
- Determinant of Identity Matrix on CUDA HOT 5
- Question on `R6::R6Class()` HOT 2
- nn_cross_entropy_loss (ignore_index = 0)
- torch_triangular_solve function deprecation warning HOT 1
- [Feature Request] Add Intel Arc Extension
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 torch.