mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00
Use shape with holes. (#771)
This commit is contained in:
@ -214,7 +214,7 @@ impl MaskDecoder {
|
||||
let hyper_in = Tensor::stack(hyper_in_list.as_slice(), 1)?;
|
||||
let (b, c, h, w) = upscaled_embedding.dims4()?;
|
||||
let masks = hyper_in.matmul(&upscaled_embedding.reshape((b, c, h * w))?)?;
|
||||
let masks = masks.reshape((b, masks.elem_count() / b / h / w, h, w))?;
|
||||
let masks = masks.reshape((b, (), h, w))?;
|
||||
|
||||
// Generate mask quality predictions.
|
||||
let iou_pred = self.iou_prediction_head.forward(&iou_token_out)?;
|
||||
|
Reference in New Issue
Block a user