This paper reports relative performance of decode-and-forward (DF) and amplify-and-forward (AF) relaying in a multi-antenna cooperative cognitive radio network (CCRN) that supports device-to-device (D2D) communications using spectrum sharing technique in cellular network. In this work, cellular system is considered as primary and internet of things devices (IoDs), engaged in D2D communications, are considered to be secondary system. The devices access the licensed spectrum by means of the cooperation in two-way primary communications. Furthermore, IoDs are energized by harvesting the energy from radio frequency (RF) signals, using simultaneous wireless information and power transfer (SWIPT) protocol. Closed form expressions of outage probability for both cellular and D2D communications are derived and the impact of various design parameters for both AF and DF relaying techniques are studied. Based on the simulation results, it is found that the proposed spectrum sharing protocol, for both DF relaying and AF relaying schemes, outperform another similar network architecture in terms of spectrum efficiency. It is also observed that the performance of the proposed system using DF relaying is better than AF relaying scheme in terms of energy efficiency at same transmit power