删除过去的pth 模型
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import ast
|
import ast
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
import threading
|
import threading
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
@@ -167,9 +169,11 @@ class Decoder_main(threading.Thread, device_type):
|
|||||||
self.b_design = signal.firwin(65, [bandPass_low / (self.fs/2), bandPass_high / (self.fs/2)], pass_zero=False) # 设计8-30Hz带通滤波器
|
self.b_design = signal.firwin(65, [bandPass_low / (self.fs/2), bandPass_high / (self.fs/2)], pass_zero=False) # 设计8-30Hz带通滤波器
|
||||||
fileName = 'Model_' + datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
|
fileName = 'Model_' + datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
|
||||||
filePath = './online_Models/'
|
filePath = './online_Models/'
|
||||||
|
for old_pth in glob.glob(os.path.join(filePath, '*.pth')):
|
||||||
|
os.remove(old_pth)
|
||||||
self.modelPath = ''.join([filePath, fileName, '.pth'])
|
self.modelPath = ''.join([filePath, fileName, '.pth'])
|
||||||
self.mp_data_queue = mp.Queue() #多进程传参队列
|
self.mp_data_queue = mp.Queue()
|
||||||
self.mp_result_queue = mp.Queue() #多进程结果队列
|
self.mp_result_queue = mp.Queue()
|
||||||
|
|
||||||
def preprocess(self, signal_data):
|
def preprocess(self, signal_data):
|
||||||
# # 计算每行的平均值
|
# # 计算每行的平均值
|
||||||
|
|||||||
Reference in New Issue
Block a user