In this paper, we focus on the defense model in response to adversarial attacks on the deep learning model in image classification and semantic segmentation task. Currently, deep learning is used in many fields and shows excellent performance in computer vision tasks such as image classification and semantic segmentation. However, it has been found that the deep learning model is highly vulnerable to small perturbation designed to attack the model against what it calls an adversarial attack. In this paper, we propose a preprocessing method against adversarial attacks and neutralize the effect of the adversarial attacks. More specifically, in image classification, we propose a preprocessing method using the tensor decomposition method and propose a denoise autoencoder in the semantic segmentation model. The model can be defended without modification, and our method shows that a relatively simple method can defend adversarial attacks.