defaultCount = input;
} else {
defaultCount = output;
}
final ArchitectureLayer layer = ArchitectureParse.parseLayer(
layerStr, defaultCount);
final boolean bias = layer.isBias();
String part = layer.getName();
if (part != null) {
part = part.trim();
} else {
part = "";
}
ActivationFunction lookup = this.factory.create(part);
if (lookup!=null) {
af = lookup;
} else {
if (layer.isUsedDefault()) {
questionPhase++;
if (questionPhase > 2) {
throw new EncogError("Only two ?'s may be used.");
}
}
if (layer.getCount() == 0) {
throw new EncogError("Layer can't have zero neurons, Unknown architecture element: "
+ architecture + ", can't parse: " + part);
}
result.addLayer(new BasicLayer(af, bias,
layer.getCount()));
}
}
result.getStructure().finalizeStructure();