In this correspondence, the outage probability (OP) of dual-hop cognitive amplify-and-forward (AF) relay networks subject to independent non-identically distributed (i.n.i.d.) Nakagami-m fading is examined. We assume a spectrum sharing environment, where two different strategies are proposed for determining the transmit powers of the secondary network. Specifically, the transmit power conditions of the proposed spectrum sharing network are governed by either: (i) the combined power constraint of the interference on the primary network and maximum transmission power at the secondary network; or (ii) the single power constraint of the interference on the primary network. Closed-form lower bounds and asymptotic expressions for the OP are derived. Regardless of the transmit power constraint, we reveal that the diversity order is strictly defined by the minimum fading severity between the two hops of the secondary network. This aligns with the well-known result for conventional dual-hop AF relaying without spectrum sharing. Furthermore, the impact of the primary network on the diversity-multiplexing tradeoff is investigated. We confirm that the diversity-multiplexing tradeoff is independent of the primary network.