Actually, I have to ask anther question. If you don't have time for it, don't feel like you have to anwser, you already helped me alot.
In the literature s.b already found a relaxtion of the original problem that leads to the SDP bound for a single layer network.
I already tried generalizing this relaxation for multilayer networks.
I created a function for my approach, however when I run it, the model generation fails:
"Error using sdpvar/model
Failed when trying to create a model for the "milpsubsref" operator
Error in expandrecursive (line 19)
[properties,F_graph,arguments,fcn] = model(variable,method,options,allExtStruct(ext_index),w);
Error in expandmodel>expand (line 415)
[F_expand,failure,cause] = expandrecursive(recover(variables(i)),F_expand,extendedvariables,monomtable,variabletype,where,level+1,options,method,[],'convex',allExtStruct,w);
Error in expandmodel (line 281)
[F_expand,failure,cause] = expand(index_in_extended,variables,-sdpvar(Fconstraint),F_expand,extendedvariables,monomtable,variabletype,['constraint #' num2str(constraint)],0,options,method,[],allExtStructs,w);
Error in compileinterfacedata (line 116)
[F,failure,cause,operators] = expandmodel(F,h,options);
Error in solvesdp (line 249)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics] = compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);
Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});
Error in GeoLip (line 108)
optimize(F, obj);"
What could be causing this? I can provide more details of course, but my generalization is rather experimental and complicated, so it could also be that I just have an error in the code (but couldn't resolve it myself until now)