title: Python ModuleNotFoundError - No module named 'pytorch_net'
body: <p>I am trying to import a file from a folder named pytorch_net from a folder named AI_physicist into a script named models.py. I have tried to change the folder locations of the files, get an <strong>init</strong>.py file into the main AI_physicist folder, and change the sys.path.append command to get only the folder with the files inside of it. I have also looked at other posts and have tried their solutions but to no avail.</p>
  <p>Here are the posts that I have found and have tried:
  <a href="https://stackoverflow.com/questions/21005822/what-does-os-path-abspathos-path-joinos-path-dirname-file-os-path-pardir">What does os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) mean? python</a></p>
  <p><a href="https://stackoverflow.com/questions/48885445/import-python-module-using-sys-path-append">import python module using sys.path.append</a></p>
  <p>file structure:</p>
  <pre><code>C:-----
    Users----
       trevo----
          Desktop----
            AI_physicist----
              pytorch_net----
              theory_learning----
  </code></pre>
  <p>Here is the error in its entirety:</p>
  <pre><code>No module named 'pytorch_net'
  File &quot;C:\Users\trevo\OneDrive\Desktop\AI_physicist\theory_learning\models.py&quot;, line 13, in &lt;module&gt;
      from pytorch_net.net import MLP
    File &quot;C:\Users\trevo\OneDrive\Desktop\AI_physicist\theory_learning\theory_model.py&quot;, line 24, in &lt;module&gt;
      from AI_physicist.theory_learning.models import Loss_Fun_Cumu, get_Lagrangian_loss
  </code></pre>
  <p>And lastly here is the code that I am using:</p>
  <p>models.py:</p>
  <pre><code># coding: utf-8
  
  # In[ ]:
  
  
  import numpy as np
  import torch
  import torch.nn as nn
  from torch.autograd import grad
  import sys, os
  sys.path.append(os.path.join(os.path.dirname(&quot;__file__&quot;), '..', '..'))
  from AI_physicist.pytorch_net.net import MLP
  from AI_physicist.pytorch_net.util import get_criterion, MAELoss, to_np_array, to_Variable, Loss_Fun
  from AI_physicist.settings.global_param import PrecisionFloorLoss, Dt
  from AI_physicist.theory_learning.util_theory import logplus
  </code></pre>
  <p>Any help on what I would be missing would be very appreciated, thank you!</p>