Skip to content

Commit

Permalink
path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuke Uchida committed Aug 15, 2020
1 parent c20bcb1 commit a523e0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pandas as pd
from sklearn.model_selection import train_test_split
import hydra
from hydra.utils import to_absolute_path
from tensorflow.keras.callbacks import LearningRateScheduler, ModelCheckpoint

from src.factory import get_model, get_optimizer, get_scheduler
Expand All @@ -10,7 +11,7 @@

@hydra.main(config_path="src/config.yaml")
def main(cfg):
csv_path = Path(__file__).resolve().parent.joinpath("meta", f"{cfg.data.db}.csv")
csv_path = Path(to_absolute_path(__file__)).parent.joinpath("meta", f"{cfg.data.db}.csv")
df = pd.read_csv(str(csv_path))
train, val = train_test_split(df, random_state=42, test_size=0.1)
train_gen = ImageSequence(cfg, train)
Expand Down

0 comments on commit a523e0d

Please sign in to comment.