从无法访问的项目Fork
体验新版 GitCode,发现更多精彩内容 >>
#--------------------------------------------# # 该部分代码只用于看网络结构,并非测试代码 # map测试请看get_dr_txt.py、get_gt_txt.py # 和get_map.py #--------------------------------------------#
import torch from torchsummary import summary from nets.CSPdarknet import darknet53 from nets.yolo4 import YoloBody
if __name__ == "__main__": # 需要使用device来指定网络在GPU还是CPU运行 device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = YoloBody(3,20).to(device) summary(model, input_size=(3, 416, 416))