drawConv2 = (curLayerIndex, d, i, width, height,
  intermediateNodeMouseOverHandler, intermediateNodeMouseLeaveHandler,
  intermediateNodeClicked) => {
  let targetX = nodeCoordinate[curLayerIndex - 1][0].x + 2 * nodeLength +
    2 * hSpaceAroundGap * gapRatio + plusSymbolRadius * 2;
  let intermediateGap = (hSpaceAroundGap * gapRatio * 2) / 3;

  // Record the left x position for dynamic detial view positioning
  intermediateLayerPosition['conv_1_2'] = targetX + nodeLength;
  intermediateLayerPositionStore.set(intermediateLayerPosition);

  // Make sure two layers have the same range
  let {range, minMax} = redrawLayerIfNeeded(curLayerIndex, i);

  // Hide the edges
  svg.select('g.edge-group')
    .style('visibility', 'hidden');

  // Move the selected layer
  moveLayerX({layerIndex: curLayerIndex, targetX: targetX, disable: true,
    delay: 0, opacity: 0.15, specialIndex: i});

  // Compute the gap in the right shrink region
  let rightStart = targetX + nodeLength + hSpaceAroundGap * gapRatio;
  let rightGap = (width - rightStart - 8 * nodeLength) / 8;

  // Move the right layers
  for (let i = curLayerIndex + 1; i < numLayers; i++) {
    let curX = rightStart + (i - (curLayerIndex + 1)) * (nodeLength + rightGap);
    moveLayerX({layerIndex: i, targetX: curX, disable: true, delay: 0});
  }

  // Add an overlay
  let stops = [{offset: '0%', color: 'rgb(250, 250, 250)', opacity: 0.85},
    {offset: '50%', color: 'rgb(250, 250, 250)', opacity: 0.95},
    {offset: '100%', color: 'rgb(250, 250, 250)', opacity: 1}];
  addOverlayGradient('overlay-gradient-right', stops);

  let leftRightRatio = (2 * nodeLength + hSpaceAroundGap * gapRatio) /
    (8 * nodeLength + intermediateGap * 7);
  let endingGradient = 0.85 + (0.95 - 0.85) * leftRightRatio;
  stops = [{offset: '0%', color: 'rgb(250, 250, 250)', opacity: endingGradient},
    {offset: '100%', color: 'rgb(250, 250, 250)', opacity: 0.85}];
  addOverlayGradient('overlay-gradient-left', stops);

  addOverlayRect('overlay-gradient-right', rightStart - overlayRectOffset / 2,
    0, width - rightStart + overlayRectOffset,
    height + svgPaddings.top + svgPaddings.bottom);

  addOverlayRect('overlay-gradient-left', nodeCoordinate[0][0].x - overlayRectOffset / 2,
    0, nodeLength * 2 + hSpaceAroundGap * gapRatio + overlayRectOffset,
    height + svgPaddings.top + svgPaddings.bottom);

  // Draw the intermediate layer
  let leftX = nodeCoordinate[curLayerIndex - 1][0].x;
  let {intermediateLayer, intermediateMinMax, kernelRange, kernelMinMax} =
    drawIntermediateLayer(curLayerIndex, leftX, targetX, rightStart,
      intermediateGap, d, i, intermediateNodeMouseOverHandler,
      intermediateNodeMouseLeaveHandler, intermediateNodeClicked);
  addUnderneathRect(curLayerIndex, i, leftX, intermediateGap, 5,
    intermediateNodeMouseOverHandler, intermediateNodeMouseLeaveHandler,
    intermediateNodeClicked);

  // After getting the intermediateMinMax, we can finally aggregate it with
  // the preLayer minmax, curLayer minmax
  let finalMinMax = {
    min: Math.min(minMax.min, intermediateMinMax.min),
    max: Math.max(minMax.max, intermediateMinMax.max)
  }

  // Add annotation to the intermediate layer
  let intermediateLayerAnnotation = svg.append('g')
    .attr('class', 'intermediate-layer-annotation')
    .style('opacity', 0);

  drawIntermediateLayerAnnotation({
    leftX: leftX,
    curLayerIndex: curLayerIndex,
    group: intermediateLayerAnnotation,
    intermediateGap: intermediateGap,
    i: i
  });

  drawIntermediateLayerLegend({
    legendHeight: 5,
    curLayerIndex: curLayerIndex,
    range: range,
    minMax: finalMinMax,
    group: intermediateLayer,
    width: 2 * nodeLength + intermediateGap,
    x: leftX,
    y: svgPaddings.top + vSpaceAroundGap * (10) + vSpaceAroundGap + 
      nodeLength * 10
  });

  drawIntermediateLayerLegend({
    legendHeight: 5,
    curLayerIndex: curLayerIndex,
    range: kernelRange,
    minMax: kernelMinMax,
    group: intermediateLayer,
    width: 2 * nodeLength + intermediateGap,
    x: targetX + nodeLength - (2 * nodeLength + intermediateGap),
    y: svgPaddings.top + vSpaceAroundGap * (10) + vSpaceAroundGap + 
      nodeLength * 10,
    gradientAppendingName: 'kernelColorGradient',
    colorScale: layerColorScales.weight,
    gradientGap: 0.2
  });

  // Show everything
  svg.selectAll('g.intermediate-layer, g.intermediate-layer-annotation')
    .transition()
    .delay(500)
    .duration(500)
    .ease(d3.easeCubicInOut)
    .style('opacity', 1);
}
Draw the intermediate layer before conv_1_2
@param {number} curLayerIndex Index of the selected layer
@param {object} d Bounded d3 data
@param {number} i Index of the selected node
@param {number} width CNN group width
@param {number} height CNN group height
@param {function} intermediateNodeMouseOverHandler mouse over handler
@param {function} intermediateNodeMouseLeaveHandler mouse leave handler
@param {function} intermediateNodeClicked node clicking handler