Comments (3)
I tried to do this myself, but because clone
is autogenerated, I had to change the Declarations file (I believe), but when I try to autogenerate the functions I get:
> torchgen::generate("~/gh/torch")
Starting code generation ...
Error in `purrr::map_chr()`:
ℹ In index: 1.
Caused by error:
! Result must be length 1, not 0.
from torch.
This kind of still breaks when one wants to do something like nn_parameter(torch_tensor(1))$clone()
.
While admittedly this might be less important, I think the (autogenerated)torch_clone()
method itself should just preserve the attributes.
from torch.
I see, you are right! Perhaps you can add a method like clone_with_attributes
around here:
Line 14 in 0e9fdd7
With the behavior you desire and then I can make the plumbing for it to be the default clone
.
TBH I haven't executed much torchgen like this, almost always doing load_all() then generate()
with the defaults. So maybe there's a hardcode path that doesn't work properly when running from a different directory.
from torch.
Related Issues (20)
- [Feature Request] Add Intel Arc Extension
- A possible mistake in document "GET TECHNICAL" on the broadcasting
- Typo (?) in "get technical" document "Modules"
- Issue installing GPU-enabled torch HOT 10
- Issue installing Torch on M1 Mac HOT 1
- Sometimes running on device cuda and sometimes running on device cpu automatically, why? HOT 1
- RNN with packed sequences where enforce_sorted=TRUE gives an error.
- Failure to load Lantern error escapes tryCatch() function HOT 7
- torch_arange() behaviour depends on the dtype HOT 2
- torch_split() does not work HOT 2
- Parallel Dataloader failing when using num_workers > 0 HOT 1
- New release? HOT 1
- dimension of torch tensor drops to zero when selecting a single element of a torch tensor HOT 2
- Cuda 11.6 deprecated HOT 2
- torch fails on new Mac M3 architecture HOT 12
- Release torch 0.13.0
- `torch_triu_indices` and `torch_tril_indices` return 0-based index
- first and second order derivative of gamma samples HOT 1
- Unable to load pre-trained alexnet weights HOT 2
- Can't download lantern from https://torch-cdn.mlverse.org when install torch 0.13.0 in win11 HOT 4
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.