From ce0214800694ba7f8b2ec2d91fca01ea56c26435 Mon Sep 17 00:00:00 2001 From: jhlim Date: Tue, 19 Feb 2019 14:41:19 +0900 Subject: [PATCH] fix ModuleNotFoundError: No module named 'common' --- ch04/gradient_simplenet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ch04/gradient_simplenet.py b/ch04/gradient_simplenet.py index 8e504378..d2e779be 100644 --- a/ch04/gradient_simplenet.py +++ b/ch04/gradient_simplenet.py @@ -1,6 +1,9 @@ # coding: utf-8 import sys, os sys.path.append(os.pardir) # 부모 디렉터리의 파일을 가져올 수 있도록 설정 +sys.path.append(os.path.abspath(os.path.join(__file__, '..', '..'))) +#print (os.path.abspath(os.path.join(__file__, '..', '..'))) + import numpy as np from common.functions import softmax, cross_entropy_error from common.gradient import numerical_gradient