Weird problem with importing going_modular #678
-
hey Daniel This is my code: try:
from going_modular.going_modular import data_setup, engine
except:
print('Couldn`t find going madular scripts.. Downloading it...')
!git clone https://github.com/mrdbourke/pytorch-deep-learning
!mv pytorch-deep-learning/going_modular. # <--------- **This is the difference between mine and yours**
!rm -rf pytorch-deep-learning
from going_modular.going_modular import data_setup, engine This is your code: try:
from going_modular.going_modular import data_setup, engine
except:
# Get the going_modular scripts
print("[INFO] Couldn't find going_modular scripts... downloading them from GitHub.")
!git clone https://github.com/mrdbourke/pytorch-deep-learning
!mv pytorch-deep-learning/going_modular .
!rm -rf pytorch-deep-learning
from going_modular.going_modular import data_setup, engine |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @mfarhadirad , Great question! The Let me explain. The For example, if I'm in the directory In the line:
It is saying "move the contents of As in, if the directory is laid out like:
And I'm currently in
Another way of thinking of it is:
Stands for:
So the contents of So you need the space in -- Let me know if this helps! See here for more: https://superuser.com/questions/171871/what-is-the-difference-between-and |
Beta Was this translation helpful? Give feedback.
Hi @mfarhadirad ,
Great question!
The
.
can be a little confusing.Let me explain.
The
.
is short for "current directory".For example, if I'm in the directory
daniel/
and I write.
, it means I'm referring todaniel/
.In the line:
It is saying "move the contents of
going_modular
to here".As in, if the directory is laid out like:
And I'm currently in
daniel/
, it will become:Another way of thinking of it is:
Stands for:
S…