Memristor-based neural networks offer energy-efficient AI, potentially self-powered with energy harvesters. However, most memristor networks rely on analog in-memory computing, needing stable power incompatible with unstable energy harvesters. This work details a robust binarized neural network (32,768 memristors) powered by a miniature wide-bandgap solar cell. Using digital near-memory computing with complementary memristors and logic-in-sense-amplifier, the circuit avoids compensation/calibration, functioning under diverse conditions. High illumination yields performance comparable to a lab power supply; low illumination maintains functionality with slightly reduced accuracy, transitioning to approximate computing. Image classification simulations show that misclassifications under low illumination mainly involve difficult-to-classify images. This approach enables self-powered AI and intelligent sensors for various applications.