Skip to content

Commit

Permalink
Merge pull request thuml#205 from gukgurgel/gustavo
Browse files Browse the repository at this point in the history
remove unused and duplicated imports
  • Loading branch information
wuhaixu2016 authored Jan 15, 2024
2 parents 8f7cb20 + 1227b87 commit 8f6d477
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 33 deletions.
5 changes: 1 addition & 4 deletions data_provider/data_loader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import numpy as np
import pandas as pd
import os
import torch
from torch.utils.data import Dataset, DataLoader
from torch.utils.data import Dataset
from sklearn.preprocessing import StandardScaler
from utils.timefeatures import time_features
import warnings
Expand Down
1 change: 0 additions & 1 deletion exp/exp_basic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import torch
import numpy as np


class Exp_Basic(object):
Expand Down
1 change: 0 additions & 1 deletion exp/exp_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import time

import warnings
import matplotlib.pyplot as plt
import numpy as np

warnings.filterwarnings('ignore')
Expand Down
5 changes: 0 additions & 5 deletions layers/AutoCorrelation.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
import matplotlib.pyplot as plt
import numpy as np
import math
from math import sqrt
import os


class AutoCorrelation(nn.Module):
Expand Down
2 changes: 0 additions & 2 deletions layers/Embed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
import math

def compared_version(ver1, ver2):
Expand Down
5 changes: 0 additions & 5 deletions layers/SelfAttention_Family.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import torch
import torch.nn as nn
import torch.nn.functional as F

import matplotlib.pyplot as plt

import numpy as np
import math
from math import sqrt
from utils.masking import TriangularCausalMask, ProbMask
from reformer_pytorch import LSHSelfAttention
import os


class FullAttention(nn.Module):
Expand Down
1 change: 0 additions & 1 deletion layers/Transformer_EncDec.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import torch
import torch.nn as nn
import torch.nn.functional as F

Expand Down
5 changes: 1 addition & 4 deletions models/Autoformer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from layers.Embed import DataEmbedding, DataEmbedding_wo_pos
from layers.Embed import DataEmbedding_wo_pos
from layers.AutoCorrelation import AutoCorrelation, AutoCorrelationLayer
from layers.Autoformer_EncDec import Encoder, Decoder, EncoderLayer, DecoderLayer, my_Layernorm, series_decomp
import math
import numpy as np


class Model(nn.Module):
Expand Down
5 changes: 1 addition & 4 deletions models/Informer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.masking import TriangularCausalMask, ProbMask
from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer
from layers.SelfAttention_Family import FullAttention, ProbAttention, AttentionLayer
from layers.SelfAttention_Family import ProbAttention, AttentionLayer
from layers.Embed import DataEmbedding
import numpy as np


class Model(nn.Module):
Expand Down
4 changes: 1 addition & 3 deletions models/Reformer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer
from layers.Transformer_EncDec import Encoder, EncoderLayer
from layers.SelfAttention_Family import ReformerLayer
from layers.Embed import DataEmbedding
import numpy as np


class Model(nn.Module):
Expand Down
4 changes: 1 addition & 3 deletions models/Transformer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer
from layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer
from layers.SelfAttention_Family import FullAttention, AttentionLayer
from layers.Embed import DataEmbedding
import numpy as np


class Model(nn.Module):
Expand Down

0 comments on commit 8f6d477

Please sign in to comment.