Learn practical skills, build real-world projects, and advance your career
import os
import h5py
import json
import pickle
from pathlib import Path

import numpy as np

import tensorflow as tf
import tensorflow.keras as ks
from google.colab import drive
drive.mount('/content/drive')
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
modelCheckpoints = Path('bnnModelCheckpointsMnistC')
modelPth = Path('./models')
os.makedirs(modelCheckpoints, exist_ok=True)
os.makedirs(modelPth, exist_ok=True)
dataDirRootPath = Path('./drive/My Drive/datasets')
obj = {
    'DATADIR' : str(dataDirRootPath),
    'MODELDIR': str(modelPth)
}

with open('nn.config.json', 'w') as fp:
    json.dump(obj, fp)