我試圖合并從兩個不同編碼器中獲得的特征圖,這些編碼器在 Pytorch 中具有不同的維度
simclr_features:torch.Size([543, 512])
imagenet_features:torch.Size([543, 1024])
所以我想:torch.Size([543, 1536])。什么是可能的解決方案?
uj5u.com熱心網友回復:
您可以使用torch.cat:
torch.cat((simclr_features, imagenet_features), dim=1)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/510346.html
標籤:机器学习火炬
