配置文件
[blablabla]
bla = blabla
...
[testing settings]
#Choose the model to test: best==epoch with min loss, last==last epoch
best_last = best
#number of full images for the test (max 20)
full_images_to_test = 20
#How many original-groundTruth-prediction images are visualized in each image
N_group_visual = 1
#Compute average in the prediction, improve results but require more patches to be predicted
average_mode = True
#Only if average_mode==True. Stride for patch extraction, lower value require more patches to be predicted
stride_height = 5
stride_width = 5
#if running with nohup
nohup = False
import configparser
#config file to read from
config = configparser.RawConfigParser()
config.read(r'./configuration.txt')
nohup = config.getboolean('testing settings', 'nohup') #std output on log file?
stride_height = config.get('testing settings', 'stride_height')
bla = config.get('blablabla', 'bla')
print(type(nohup),nohup)
print(type(stride_height),stride_height)
print(type(bla),bla)
<class 'bool'> False
<class 'str'> 5
<class 'str'> blabla
本文详细介绍了一个配置文件的结构和解析方式,包括如何选择测试模型、设置测试参数、启用平均预测模式以及调整补丁提取步幅等关键配置项。通过实例展示了不同类型配置项的数据类型和读取方法。
6723

被折叠的 条评论
为什么被折叠?



