Skip to content

Commit

Permalink
#23: train_small.py refactoring using argparser
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaru committed Oct 1, 2018
1 parent f424531 commit 6d6ff42
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 175 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.tar
-checkpoint.ipynb
*-checkpoint.ipynb
script/
13 changes: 8 additions & 5 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from utilities.utils import update_vis_plot
from utilities.utils import visualize_GT

from utilities.dataloader_test import detection_collate
from utilities.dataloader import detection_collate
import yolov1

viz = visdom.Visdom()
Expand Down Expand Up @@ -54,16 +54,17 @@
DATASET_PATH_MARTIN_LAP = "/home/martin/Desktop/5class/_class_balance/"
DATASET_PATH_MARTIN_COM = "/home/martin/Desktop/_class_balance/"
DATASET_PATH_JAEWON = "D:\dataset\VOC2012"
# transforms.ToTensor()
train_dataset = VOC(root = DATASET_PATH_MARTIN_COM,
transform=None, cls_option = False, selective_cls=None)


train_dataset = VOC(root = DATASET_PATH_MARTIN_COM, transform=None)

train_loader = torch.utils.data.DataLoader(dataset=train_dataset,
batch_size = batch_size,
shuffle = True,
collate_fn=detection_collate)


"""
net = yolov1.YOLOv1()
# visualize_weights_distribution(net)
Expand Down Expand Up @@ -155,4 +156,6 @@
'optimizer': optimizer.state_dict(),
}, False, filename='checkpoint_{}.pth.tar'.format(epoch))
f.close()
f.close()
"""
Loading

0 comments on commit 6d6ff42

Please sign in to comment.