CvT:将卷积引入视觉变形金刚 CvT的Pytorch实现 用法: img = torch . ones ([ 1 , 3 , 224 , 224 ]) model = CvT ( 224 , 3 , 1000 ) parameters = filter ( lambda p : p . requires_grad , model . parameters ()) parameters = sum ([ np . prod ( p . size ()) for p in parameters ]) / 1_000_000 print ( 'Trainable Parameters: %.3fM' % parameters ) out = model ( img ) print ( "Shape of out :" , out . shape ) # [B, num_classes] 引