@Override
    public void calculate(List<Connections> connections, ValuesProvider valuesProvider, Layer targetLayer) {
	if (connections.size() > 0) {
	    List<Connections> notBias = new ArrayList<>();
	    Connections bias = null;

	    for (Connections c : connections) {
		// bias layer scenarios
		if (Util.isBias(c.getInputLayer())) {
		    bias = c;
		} else {
		    notBias.add(c);
		}
	    }

	    if (notBias.size() > 0) {
		if (preTransferFunctions != null && preTransferFunctions.size() > 0) {
		    preTransferFunctions.forEach(f -> notBias.stream().filter(c -> !Util.isBias(c.getInputLayer())).forEach(c -> f.value(TensorFactory.tensor(Util.getOppositeLayer(c, targetLayer), c, valuesProvider))));
		}

		calculateBias(bias, valuesProvider);

		getConnectionCalculator(notBias, valuesProvider, targetLayer).calculate(notBias, valuesProvider, targetLayer);

		if (activationFunctions != null) {
		    activationFunctions.forEach(f -> f.value(TensorFactory.tensor(targetLayer, notBias, valuesProvider)));
		}

		if (dropoutRate > 0) {
		    if (dropoutFunction == null) {
			dropoutFunction = createDropoutFunction(notBias, valuesProvider, targetLayer);
		    }

		    dropoutFunction.value(TensorFactory.tensor(targetLayer, notBias, valuesProvider));
		}
	    }
	}
    }