class LogProbGradientCalculator {

    public Map<VertexId, DoubleTensor> getJointLogProbGradientWrtLatents() {
        LogProbGradients totalLogProbGradients = new LogProbGradients();

        for (final Vertex<?, ?> ofVertex : logProbOfVertices) {
            LogProbGradients logProbGradientOfVertex = reverseModeLogProbGradientWrtLatents(ofVertex);
            totalLogProbGradients.add(logProbGradientOfVertex);
        }

        return totalLogProbGradients.getPartials();
    }

    public  LogProbGradientCalculator(List<? extends Vertex> logProbOfVerticesList, List<? extends Vertex<?, ?>> wrtVerticesList);

}