Skip to content

Commit

Permalink
move model.py to model folder
Browse files Browse the repository at this point in the history
  • Loading branch information
james.chan committed Oct 17, 2023
1 parent bb32464 commit 1e335dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
from model import HousePriceModel, TransformerRegressor
from model.model import HousePriceModel, TransformerRegressor
from dataloader import HousePriceTestDataset, min_max_denormalize, z_score_denormalize
import platform

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
from torch.utils.data import Dataset, DataLoader
from sklearn.preprocessing import StandardScaler
from model import HousePriceModel, TransformerRegressor
from model.model import HousePriceModel, TransformerRegressor
from dataloader import HousePriceTrainDataset
import platform

Expand All @@ -20,7 +20,7 @@ def main():
'移轉層次': 'min-max',
'總樓層數': 'min-max',
'屋齡': 'min-max',
'建物面積': 'min-max',
# '建物面積': 'min-max',
'車位面積': 'min-max',
'車位個數': 'min-max',
'橫坐標': 'min-max', #z-score
Expand All @@ -44,7 +44,7 @@ def main():
print(input_dim)
# Initialize model
# model = HousePriceModel(input_dim)
model = TransformerRegressor(input_dim, 4, 6)
model = TransformerRegressor(input_dim, 4, 11)

if gpu:
model = model.cuda()
Expand Down

0 comments on commit 1e335dd

Please sign in to comment.