11 lines
355 B
Python
11 lines
355 B
Python
|
|
||
|
from model.backbone.CoaT import CoaT
|
||
|
import torch
|
||
|
from torch import nn
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
input=torch.randn(1,3,224,224)
|
||
|
model = CoaT(patch_size=4, embed_dims=[152, 152, 152, 152], serial_depths=[2, 2, 2, 2], parallel_depth=6, num_heads=8, mlp_ratios=[4, 4, 4, 4])
|
||
|
output=model(input)
|
||
|
print(output.shape) # torch.Size([1, 1000])
|