Closed hnakamur closed 7 years ago
In the book and the other source codes except ch05/train_neuralnet.py uses
ch05/train_neuralnet.py
sys.path.append(os.pardir)
but ch05/train_neuralnet.py uses
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
to add the parent directory to sys.path.
sys.path
With this fix, you can run exec(open('train_neuralnet.py').read()) successfully on Python3 prompt in ch05 directory.
exec(open('train_neuralnet.py').read())
ch05
Thank you!
In the book and the other source codes except
ch05/train_neuralnet.py
usesbut
ch05/train_neuralnet.py
usesto add the parent directory to
sys.path
.With this fix, you can run
exec(open('train_neuralnet.py').read())
successfully on Python3 prompt inch05
directory.