Tjyy-1223 / Neurosurgeon

云边协同- collaborative inference 📚Neurosurgeon: Collaborative Intelligence Between the Cloud and Mobile Edge
55 stars 8 forks source link

predictor的dataset是怎么生成的? #7

Open zq7695zq opened 10 months ago

zq7695zq commented 10 months ago

请问大佬,predictor的dataset是怎么生成的?我看代码只有根据dataset生成config,没有生成dataset的相关代码。

Tjyy-1223 commented 10 months ago

这个dataset是我对不同的dnn layer在我的一个边缘设备和云端设备上运行,记录时间跑出来的。dataset的收集过程和带宽没有太大关系,你可以在你的机器上去运行卷积层或全连接层,并用python中的time库记录层的推理时间。或者直接使用我提供的dataset数据集去尝试完成任务

shichaoya commented 8 months ago

他这个每一层的推理时间是记录在哪里呢

Tjyy-1223 commented 8 months ago

你是说运行的时候吗,运行的时候net/net_utils/84行-86行有针对分割好的edge_model推理时延进行测量,但是没有针对其中每一层去测。你需要的话可以使用 inference_utils.recordTime 函数去对每一层dnn收集