File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ private enum Vision {
336
336
@ModuleInfo ( key: " position_embedding " ) var positionEmbedding : Embedding
337
337
338
338
let positions : Int
339
- let positionIds : MLXArray
339
+ let _positionIds : MLXArray
340
340
341
341
public init ( _ config: PaliGemmaConfiguration . VisionConfiguration ) {
342
342
self . _patchEmbedding. wrappedValue = Conv2d (
@@ -348,13 +348,13 @@ private enum Vision {
348
348
self . _positionEmbedding. wrappedValue = Embedding (
349
349
embeddingCount: positions, dimensions: config. hiddenSize
350
350
)
351
- self . positionIds = MLXArray ( 0 ..< positions) [ . newAxis, 0 ... ]
351
+ self . _positionIds = MLXArray ( 0 ..< positions) [ . newAxis, 0 ... ]
352
352
}
353
353
354
354
public func callAsFunction( _ x: MLXArray ) -> MLXArray {
355
355
var patchEmbeddings = self . patchEmbedding ( x)
356
356
patchEmbeddings = patchEmbeddings. flattened ( start: 1 , end: 2 )
357
- let embeddings = patchEmbeddings + self . positionEmbedding ( self . positionIds )
357
+ let embeddings = patchEmbeddings + self . positionEmbedding ( self . _positionIds )
358
358
return embeddings
359
359
}
360
360
}
You can’t perform that action at this time.
0 commit comments