cs230-stanford / cs230-code-examples

Code examples in pyTorch and Tensorflow for CS230
Other
3.79k stars 984 forks source link

Windows compatability #21

Open karanrampal opened 4 years ago

karanrampal commented 4 years ago

https://github.com/cs230-stanford/cs230-code-examples/blob/96ac6fd7dd72831a42f534e65182471230007bee/tensorflow/vision/build_dataset.py#L40

I think we can maybe use os.path.basename(filename) instead of filename.split('/')[-1] as in windows os the paths to images get a \\ instead of /. Just with this change we can keep a consistent backslash system. Just a thought.