In addition to the same feature extractor \(f\)  and final classifier \(g\)  employed for the strong learner, the weak learner \(H\)  comprises a two-layer attention mechanism \(a\)  as proposed in [1]} (see fig:wlarchitecture). For an input examination with \(r\)  images, the attention mechanism combines the \(r\)  image-level feature vectors into a single examination-level feature vector which can be expressed as a convex combination of the image-level feature vectors. In this work—differently from the original work in [1]}—we use the sparsemax activation function [3]}, [4]}, [5]} rather then the softmax function to favor sparse attention weights.The entmax package is available at: https://github.com/deep-spin/entmax.
