* @param layer
* @return whether layer is in fact bias layer
*/
public static boolean isBias(Layer layer) {
if (layer.getConnections().size() == 1) {
Connections c = layer.getConnections().get(0);
if (c.getInputLayer() == layer) {
if (c instanceof Conv2DConnection) {
Conv2DConnection cc = (Conv2DConnection) c;
return cc.getInputFilters() == 1 && cc.getInputFeatureMapRows() == cc.getOutputFeatureMapRows() && cc.getInputFeatureMapColumns() == cc.getOutputFeatureMapColumns();
} else if (c instanceof GraphConnections) {
GraphConnections cg = (GraphConnections) c;