Skip to content
Snippets Groups Projects
Commit a79276ba authored by hsharif3's avatar hsharif3
Browse files

time estimation

parent d79d8707
No related branches found
No related tags found
No related merge requests found
class Config:
def __init__(self):
self.runtime = 0
self.fed_runs = 0
self.full_runs = 0
def computeTimes(bench):
conf_runs = 60
fed_time = (bench.runtime * 100) + (bench.fed_runs * conf_runs * bench.runtime)
fed_time_hrs = fed_time / (60*60)
full_time = (bench.runtime * 1000) + (bench.full_runs * conf_runs * bench.runtime)
full_time_hrs = full_time / (60*60)
print ("fedtime_hrs = ", fed_time_hrs, " full_time_hrs = ", full_time_hrs, "\n")
if __name__ == "__main__":
resnet = Config()
resnet.runtime = 8
resnet.fed_runs = 3
resnet.full_runs = 5
computeTimes(resnet)
alexnet = Config()
alexnet.runtime = 7.8
alexnet.fed_runs = 47
alexnet.full_runs = 274
computeTimes(alexnet)
alexnet2 = Config()
alexnet2.runtime = 2.3
alexnet2.fed_runs = 62
alexnet2.full_runs = 339
computeTimes(alexnet2)
vgg1 = Config()
vgg1.runtime = 7.4
vgg1.fed_runs = 15
vgg1.full_runs = 211
computeTimes(vgg1)
vgg2 = Config()
vgg2.runtime = 15.4
vgg2.fed_runs = 8
vgg2.full_runs = 150
computeTimes(vgg2)
lenet = Config()
lenet.runtime = 0.98
lenet.fed_runs = 64
lenet.full_runs = 228
computeTimes(lenet)
mobilenet = Config()
mobilenet.runtime = 11
mobilenet.fed_runs = 32
mobilenet.full_runs = 267
computeTimes(mobilenet)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment