I see a code like this:
import torch
from torch import nn
from sklearn.metrics import r2_score
i’m learning python but i dont see really a doc where can explain the first import, i think two first lines it’s equivalent to this in another languages:
from torch import torch.nn
i mean why two lines, I think because the code use later only torch,
i dont understand the submodles in two levels in python, any url for doc ? what about more than 3 or 4 modules levels ?