parent
dc7772fb8a
commit
04bb2566fc
@ -0,0 +1,34 @@
|
|||||||
|
import matplotlib.pyplot as plt
|
||||||
|
train_parameters={
|
||||||
|
"input_size":[3,244,244],
|
||||||
|
"class_dim":-1,
|
||||||
|
'target_path':"./data_set",
|
||||||
|
"train_list_path":'./train.txt',
|
||||||
|
'eval_list_path':'./eval.txt',
|
||||||
|
"readme_path": "./readme.json",
|
||||||
|
'label_dict':{'0': 'maskimages', '1': 'nomaskimages'},
|
||||||
|
"train_batch_size": 8,
|
||||||
|
'num_epochs':1,
|
||||||
|
"learning_stategry":{
|
||||||
|
'lr':0.001
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def draw_train_process(title,iters,cost,accs,label_cost,label_acc):
|
||||||
|
plt.title(title,fontsize=24)
|
||||||
|
plt.xlabel('iter',fontsize=20)
|
||||||
|
plt.ylabel('cost/acc',fontsize=20)
|
||||||
|
plt.plot(iters,cost,color='red',label=label_cost)
|
||||||
|
plt.plot(iters,accs,color='green',label=label_acc)
|
||||||
|
plt.legend()
|
||||||
|
plt.grid()
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
def draw_process(title,color,iters,data,label):
|
||||||
|
plt.title(title, fontsize=24)
|
||||||
|
plt.xlabel("iter", fontsize=20)
|
||||||
|
plt.ylabel(label, fontsize=20)
|
||||||
|
plt.plot(iters, data,color=color,label=label)
|
||||||
|
plt.legend()
|
||||||
|
plt.grid()
|
||||||
|
plt.show()
|
Loading…
Reference in new issue