Traceback (most recent call last):
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/scripts/train.py", line 261, in <module>
args.verbose_logging, args.debug)
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/scripts/train.py", line 251, in train
train_obj.main_loop(time_budget=time_budget)
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/train.py", line 141, in main_loop
self.setup()
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/train.py", line 121, in setup
self.algorithm.setup(model=self.model, dataset=self.dataset)
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/training_algorithms/sgd.py", line 316, in setup
** fixed_var_descr.fixed_vars)
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/costs/cost.py", line 343, in expr
costs.append(cost.expr(model, cost_data, **kwargs))
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/costs/mlp/__init__.py", line 206, in expr
total_cost.name = 'MLP_L1Penalty'
File "/Users/closq/Dropbox/NeuralNetwork/Viscosity/pylearn2/pylearn2/models/mlp.py", line 4110, in get_l1_weight_decay
W, = self.layer_content.weights()
TypeError: 'TensorSharedVariable' object is not callable
Here it seems that the layer_content.weights() cannot be assigned to W... Do you have any idea to avoid this issue?
Despite those code issues, I solved my problem by avoiding using the PreTrainedLayer class and directly reading the weights of the autoencoders in a python script, and assigning them to the MLP after creating the latter. However, it will be nice to find a way to be able to directly use the PreTrainedLayer class with L1 and L2 regularizations in a yaml script.