Deep Learning Chapter 5 Error Reverse Propagation Method Starting from the Bottom

Asked 2 years ago, Updated 2 years ago, 97 views

p.184 5.7.3 Verifying the slope determined by the error backpropagation method I'm trying to implement it.

In the previous section

I think it's because I set the wrong directory because I kept googling when I loaded the from dataset.mnist import load_mnist file.

The path was modified using os.chdir().

-> os.chdir ("C:\python36\from_scratch-master\deeplearning_from_scratch-master\ch1.Hello Python")

By this route.

Then I loaded the file from dataset.mnist import load_mnist.

I need to get from two_layer_net import TwoLayerNet, but it didn't.

So I set the route again.

-> os.chdir ("C:\python36\deeplearning_from_scratch-master") Like this

But I keep getting errors

Traceback (most recent call last): File "", line 1, in from two_layer_net import TwoLayerNet ModuleNotFoundError: No module named 'two_layer_net'

I saved the download from GitHub in this path.

C:\python36\deeplearning_from_scratch-master

It's not hard to implement anything else, but the path is a problem whenever I keep calling the files I'm trying to retrieve from GitHub.

I want to know how to set the path.

deep-learning

2022-09-22 20:05

1 Answers

I can't quite understand the question because it's too long.

Assume that the two_layer_net module file is located in C:\python36\deeplearning_from_scratch-master

import sys
print(sys.path)

This will show you a list of paths to call the module.

sys.path.append('C:\python36\deeplearning_from_scratch-master')

This adds a path.


2022-09-22 20:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.