您好,我想查看模型的参数量和flop,所以我在 tariner.py的build_model函数下面,
for seq_len, in_channels, d_model in zip(self.seq_lens, feat_dims, [256, 512]):
model = FOD(seq_len=seq_len,
in_channels=in_channels,
out_channels=in_channels,
d_model=d_model,
n_heads=8,
n_layers=3,
args=self.args)
print('One Model...Done')
models.append(model.to(self.args.device))
self.models = models
print('Creating Models...Done')
dummy_input = torch.randn(1, 3, 256, 256)
flops, params = profile(model, (dummy_input,)),添加了profile 的 代码,但是我始终无法确定dummy_input 的维度大小,请问您模型的输入维度是多少呢?期待您的解答,谢谢!!
您好,我想查看模型的参数量和flop,所以我在 tariner.py的build_model函数下面,
for seq_len, in_channels, d_model in zip(self.seq_lens, feat_dims, [256, 512]):
model = FOD(seq_len=seq_len,
in_channels=in_channels,
out_channels=in_channels,
d_model=d_model,
n_heads=8,
n_layers=3,
args=self.args)
print('One Model...Done')