mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 11:37:11 +00:00
Merge pull request #127 from LaurentMazare/tensor_indexing
`i(..)` indexing sugar (partial).
This commit is contained in:
@ -504,10 +504,11 @@ impl Tensor {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let layout = self.layout().narrow(dim, start, len)?;
|
||||
let tensor_ = Tensor_ {
|
||||
id: TensorId::new(),
|
||||
storage: self.storage.clone(),
|
||||
layout: self.layout().narrow(dim, start, len)?,
|
||||
layout,
|
||||
op,
|
||||
is_variable: false,
|
||||
};
|
||||
|
Reference in New Issue
Block a user