0

I have two Python environment and using PATHLIB to construct references to files and for placement.

When I run the code on 3.6 below is works fine. In 3.5 I can't get it to work, so I have to manually specify every path. I'm new to this whole world. Am I missing something. Was there a big change between versions like f'strings ... I didn't seem to find big changes, just in earlier versions where they tell you to use PATHLIB2 but I shouldn't need that here. Help!

ROOT_DIR = Path(".")
COCO_WEIGHTS_PATH = ROOT_DIR / "mask_rcnn_coco.h5"
if not COCO_WEIGHTS_PATH.exists():
    utils.download_trained_weights(str(COCO_WEIGHTS_PATH))

# Directory to save logs and model checkpoints
DEFAULT_LOGS_DIR = ROOT_DIR / "training_logs"

# Where the training images and annotation files live
DATASET_PATH = ROOT_DIR / "training_images"

# Start training from the pre-trained COCO model
WEIGHTS_TO_START_FROM = COCO_WEIGHTS_PATH
Paul Z
  • 53
  • 6
  • 1
    What means "I can't get it to work" exactly? Have you tried e.g. to `print(str(COCO_WEIGHTS_PATH))`. Is it as expected? Have you tried an absolute path instead of a relative one? – Michael Butscher Dec 11 '18 at 23:02
  • I mean that is just won't work ... if I specify the exact path it works. Odd. I will try your suggestion and update. Thanks for the response! – Paul Z Dec 18 '18 at 15:00

0 Answers0