@@ -490,7 +490,7 @@ def forward_features(self, x0):
490490
491491 # Serial blocks 1.
492492 x1 = self .patch_embed1 (x0 )
493- H1 , W1 = self .patch_embed1 .out_size
493+ H1 , W1 = self .patch_embed1 .grid_size
494494 x1 = self .insert_cls (x1 , self .cls_token1 )
495495 for blk in self .serial_blocks1 :
496496 x1 = blk (x1 , size = (H1 , W1 ))
@@ -499,7 +499,7 @@ def forward_features(self, x0):
499499
500500 # Serial blocks 2.
501501 x2 = self .patch_embed2 (x1_nocls )
502- H2 , W2 = self .patch_embed2 .out_size
502+ H2 , W2 = self .patch_embed2 .grid_size
503503 x2 = self .insert_cls (x2 , self .cls_token2 )
504504 for blk in self .serial_blocks2 :
505505 x2 = blk (x2 , size = (H2 , W2 ))
@@ -508,7 +508,7 @@ def forward_features(self, x0):
508508
509509 # Serial blocks 3.
510510 x3 = self .patch_embed3 (x2_nocls )
511- H3 , W3 = self .patch_embed3 .out_size
511+ H3 , W3 = self .patch_embed3 .grid_size
512512 x3 = self .insert_cls (x3 , self .cls_token3 )
513513 for blk in self .serial_blocks3 :
514514 x3 = blk (x3 , size = (H3 , W3 ))
@@ -517,7 +517,7 @@ def forward_features(self, x0):
517517
518518 # Serial blocks 4.
519519 x4 = self .patch_embed4 (x3_nocls )
520- H4 , W4 = self .patch_embed4 .out_size
520+ H4 , W4 = self .patch_embed4 .grid_size
521521 x4 = self .insert_cls (x4 , self .cls_token4 )
522522 for blk in self .serial_blocks4 :
523523 x4 = blk (x4 , size = (H4 , W4 ))
0 commit comments