We address the question of when a network can be expected to generalize from m random training examples chosen from some arbitrary probability distribution, assuming that future test examples are drawn from the same distribution. Among our results are the following bounds on appropriate sample vs, network size. Assume 0 < is an element of <= 1/8. We show that if m >= O(W/is an element of log N/is an element of) random examples can be loaded on a feedforward network of linear threshold functions with N nodes and W weights, so that at least a fraction 1 - is an element of/2 of the examples are correctly classified, then one has confidence approaching certainty that the network will correctly classify a fraction 1 - is an element of of future test examples drawn from the same distribution. Conversely, for fully-connected feedforward nets with one hidden layer, any learning algorithm using fewer than Omega(W/is an element of) random training examples will, for some distributions of examples consistent with an appropriate weight choice, fail at least some fixed fraction of the time to find a weight choice that will correctly classify more than a 1 - is an element of fraction of the future test examples.