可以将 python 命令中的数据添加到 yaml 文件中吗?这是yaml文件:
!obj:pylearn2.train.Train {
dataset: !obj:pylearn2.datasets.hepatitis.Hepatitis &dataset {
},
model: !obj:pylearn2.models.mlp.MLP {
batch_size: 50,
layers : [
# We use two hidden layers with maxout activations
!obj:pylearn2.models.maxout.Maxout {
layer_name: 'h0',
num_units: 300,
num_pieces: 2,
irange: 0.5,
},
#I want to add another of !obj:pylearn2.models.maxout.Maxout{...} from my python file...
!obj:pylearn2.models.mlp.Softmax {
layer_name: 'y',
# Initialize the weights to all 0s
irange: 0.5,
n_classes: 2
}
],
nvis: 2612,
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
learning_rate : 1e-3,
batch_size : 50,
monitoring_batches : 20,
monitoring_dataset : *dataset,
termination_criterion : !obj:pylearn2.termination_criterion.MonitorBased {
prop_decrase: .01,
N : 35
},
} ,
#save the pickle file to the current directory
save_path : ./garbageprova.pkl,
#frequency of updating the file
save_freq : 100
}
如何将另一个元素添加到我的model.layers[]
列表中?