A semantic memory–based dynamic neural network using both ternary CIM and CAM structures.