13 lines
266 B
Python
13 lines
266 B
Python
|
|
||
|
from attention.ResidualAttention import ResidualAttention
|
||
|
import torch
|
||
|
from torch import nn
|
||
|
from torch.nn import functional as F
|
||
|
|
||
|
input=torch.randn(50,512,7,7)
|
||
|
resatt = ResidualAttention(channel=512,num_class=1000,la=0.2)
|
||
|
output=resatt(input)
|
||
|
print(output.shape)
|
||
|
|
||
|
|