I have been trying to modify the code so that it does not raise an error. The folllowing code does NOT raise the error:
net = NetChain[{FunctionLayer[Mean], LinearLayer[256],
ElementwiseLayer["ReLU"], LinearLayer[16],
ElementwiseLayer["ReLU"], LinearLayer[16], 1}]
but the following code DOES:
map[x_] := Mean[x]
net = NetChain[{FunctionLayer[map], LinearLayer[256],
ElementwiseLayer["ReLU"], LinearLayer[16],
ElementwiseLayer["ReLU"], LinearLayer[16], 1}]
Why?
Regards,
GW