Effective Anomaly Detection Using Deep Learning in IoT Systems