WireCell / wire-cell-toolkit

Toolkit for Liquid Argon TPC Simulation and Reconstruction
https://wirecell.github.io/
Other
7 stars 22 forks source link

Compiler error and some DNNROI related updates #344

Closed HaiwangYu closed 1 month ago

HaiwangYu commented 1 month ago

tested OK: https://indico.bnl.gov/event/25041/

brettviren commented 1 month ago

Hi @HaiwangYu

I think this PR is okay but the lack of torch::Tensor::index() in v1.6 surprises me. Is there really no way to index tensors in torch 1.6? I know one can construct a strongly typed and dimensioned "accessor", at least in LibTorch 2.x, but this lacks the "pythonic" indexing syntax.

https://pytorch.org/cppdocs/notes/tensor_basics.html#efficient-access-to-tensor-elements

HaiwangYu commented 1 month ago

There could be alternatives like index_select? Haven't tried that yet.