def create_model(name, batch_size, learning_rate = 0.0001, wd = 0.00001, concat = False, l2_loss = False, penalty = False, coef = 0.4, verbosity = 0):
"""
Create a model from model.py with the given configuration
Args:
name : name of the model (used to create a specific folder to save/load parameters)
batch_size : batch size
learning_rate : learning_rate (cross entropy is arround 100* bigger than l2)
wd : weight decay factor
concat : does this model include direct connections?
l2_loss : does this model use l2 loss (if not then cross entropy)
penalty : whether to use the edge contrast penalty
coef : coef for the edge contrast penalty
verbosity : level of details to display
Returns:
my_model : created model
"""
my_model = model.MODEL(name, batch_size, learning_rate, wd, concat, l2_loss, penalty, coef)
my_model.display_info(verbosity)
return my_model
operations.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录