Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hidden_states值 #11

Open
guzhanxin6 opened this issue Feb 27, 2024 · 1 comment
Open

hidden_states值 #11

guzhanxin6 opened this issue Feb 27, 2024 · 1 comment

Comments

@guzhanxin6
Copy link

你好,我想知道如果我进行下列初始化,hidden_states传入的值应该为多少。
if name == 'main':
model = SwinLSTM(img_size=64, patch_size=2, in_chans=2, embed_dim=64, depths=[12],
num_heads=[4, 8], window_size=4, drop_rate=0, attn_drop_rate=0, drop_path_rate=0.1)

input_features = torch.randn(2,2 ,64, 64)  
y=model(input_features,hidden_states)
@SongTang-x
Copy link
Owner

你好,对于SwinLSTM-B: states = [None] * len(num_layers),对于SwinLSTM-D:states_down = [None] * len(num_layers),
states_up = [None] * len(num_layers),模型会把hidden_states的值初始化为0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants