MisaOgura / MRNet

PyTorch implementation of the MRNet paper, developed for the MRNet Competition hosted by the Stanford ML Group
https://stanfordmlgroup.github.io/competitions/mrnet/
MIT License
46 stars 13 forks source link

unable to train logistic regression model #9

Open therc01 opened 3 years ago

therc01 commented 3 years ago

I'm unable to train lr models due to out of index error in following code ` models_per_condition = []

    for plane in planes:
        checkpoint_pattern = glob(f'{models_dir}/*{plane}*{condition}*.pt')
        checkpoint_path = sorted(checkpoint_pattern)[-1]
        checkpoint = torch.load(checkpoint_path, map_location=device)`

im getting error at sorted(checkpoint_pattern)[-1] I ran the previous scripts as directed in readme of this repo.

therc01 commented 3 years ago

problem is in glob i.e. file reading from directory. its not reading files from directory.

James-sjt commented 4 weeks ago

I'm unable to train lr models due to out of index error in following code ` models_per_condition = []

    for plane in planes:
        checkpoint_pattern = glob(f'{models_dir}/*{plane}*{condition}*.pt')
        checkpoint_path = sorted(checkpoint_pattern)[-1]
        checkpoint = torch.load(checkpoint_path, map_location=device)`

im getting error at sorted(checkpoint_pattern)[-1] I ran the previous scripts as directed in readme of this repo.

I'm unable to train lr models due to out of index error in following code ` models_per_condition = []

    for plane in planes:
        checkpoint_pattern = glob(f'{models_dir}/*{plane}*{condition}*.pt')
        checkpoint_path = sorted(checkpoint_pattern)[-1]
        checkpoint = torch.load(checkpoint_path, map_location=device)`

im getting error at sorted(checkpoint_pattern)[-1] I ran the previous scripts as directed in readme of this repo.

You can try to move all .pt files under one folder.