What you are asking doesn't make much sense. For a standard universal approximation I-H-O net the number of weights are
where the 1s correspond to biases. If either bias node is removed, the net is no longer a universal approximator.
It looks like you want
with
Consequently, O=1, H=2, I = 2 and
size(input) = [ 2 N ]
size(target) = [ 1 N ]
Since you don't specify regregression or classification, lets try classification with the exclusive or function. Typically, I desire the explained target variance = coefficient of variation, = Rsquared (See Wikipeia) to be >= 0.99.
clear all, clc
x = [1 1 -1 -1 ; -1 1 1 -1 ];
t = [ 0 1 0 1 ];
MSE00 = var(t)
net = patternnet(2);
net.biasConnect = [ 0;1];
net.divideFcn = 'dividetrain';
rng(0)
for i = 1:10
net = configure(net,x,t);
[net tr y(i,:) e] = train(net,x,t);
R2(i,:) = 1-mse(e)/MSE00;
end
y = y
R2 = R2
Obviously, can get negligible error with the input bias.
Hope this helps.
Thank you for formally accepting my answer
Greg