anilbas / 3DMMasSTN

MatConvNet implementation for incorporating a 3D Morphable Model (3DMM) into a Spatial Transformer Network (STN)
Apache License 2.0
279 stars 50 forks source link

Error Occurs when a new layer is added #11

Open ChunLLee opened 4 years ago

ChunLLee commented 4 years ago

Thank you very much for your contribution to the academic society!

However, error occurred when a new layer was added to the net. The code is: net.layers(end+1) = struct( 'name', 'theta', ... 'type', 'conv', ... 'weights', {weightsandbias}, ... 'stride', 1, ... 'pad', 0, ... 'learningRate', opts.theta_learningRate) ;

Error information:

Subscripted assignment between dissimilar structure.

Error dagnn_3dmmasstn_init (line 18) net.layers(end+1) = struct( 'name', 'theta', ...

Error dagnn_3dmmasstn (line 38) net = dagnn_3dmmasstn_init(model,idx,opts);


The layer you want to insert does not have the same content. The layers of the original net does not have 'weights' and 'learningRate', and the 'pad', 'stride' are in the 'block' item of these layers.