summaryrefslogtreecommitdiffstats
path: root/tryprune.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-10-22 17:42:04 +0800
committerPeng Wu <alexepico@gmail.com>2012-10-22 17:42:04 +0800
commit3d11ee5e5dc69cfd5fc62bab43461250f037beb5 (patch)
tree631d379c3d220e5a15c8b93f9791b9a0b8cb0cdd /tryprune.py
parent244164ed4f3f02b946114cd9cc81af62f5353172 (diff)
downloadtrainer-3d11ee5e5dc69cfd5fc62bab43461250f037beb5.tar.gz
trainer-3d11ee5e5dc69cfd5fc62bab43461250f037beb5.tar.xz
trainer-3d11ee5e5dc69cfd5fc62bab43461250f037beb5.zip
use utils.copyfile
Diffstat (limited to 'tryprune.py')
-rwxr-xr-xtryprune.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tryprune.py b/tryprune.py
index f181a70..27cf69d 100755
--- a/tryprune.py
+++ b/tryprune.py
@@ -1,7 +1,6 @@
#!/usr/bin/python3
import os
import os.path
-import shutil
import sys
from subprocess import Popen, PIPE
from argparse import ArgumentParser
@@ -200,13 +199,13 @@ if __name__ == '__main__':
if os.access(shmmodel, os.F_OK):
os.unlink(shmmodel)
#copy to memory
- shutil.copyfile(mergedmodel, shmmodel)
+ utils.copyfile(mergedmodel, shmmodel)
pruneModel(shmmodel, args.k, args.CDF)
#copy to filesystem
- shutil.copyfile(shmmodel, prunedmodel)
+ utils.copyfile(shmmodel, prunedmodel)
else:
#backup merged model
- shutil.copyfile(mergedmodel, prunedmodel)
+ utils.copyfile(mergedmodel, prunedmodel)
pruneModel(prunedmodel, args.k, args.CDF)
#validate pruned model