mirror of
https://github.com/ollama/ollama.git
synced 2025-08-28 14:53:45 +02:00
fix pixel values padding (#10718)
* panic if trying to pad 4d * fix pixel values padding
This commit is contained in:
@@ -915,6 +915,8 @@ func (t *Tensor) RMSNorm(ctx ml.Context, w ml.Tensor, eps float32) ml.Tensor {
|
||||
func (t *Tensor) Pad(ctx ml.Context, shape ...int) ml.Tensor {
|
||||
if len(shape) != 4 {
|
||||
panic("expected 4 dimensions")
|
||||
} else if shape[3] != 0 {
|
||||
panic("cuda does not support 4d tensors")
|
||||
}
|
||||
|
||||
return &Tensor{
|
||||
|
Reference in New Issue
Block a user