Example #1
0
#!/usr/bin/env python

from keras.models import Model, load_model
from keras.callbacks import ModelCheckpoint
from subtlenet.backend.keras_objects import *
from subtlenet.backend.losses import *
from subtlenet.backend.layers import *
from tensorflow.python.framework import graph_util, graph_io
import os
import numpy as np
from sys import stdout, exit
from tqdm import tqdm

from subtlenet import utils

utils.set_processor('cpu')

sqr = np.square
NZBINS = 20
ZLO = 0
ZHI = 3
ZBIN = False
lmbda = 150
D = 5


def _make_parent(path):
    os.system('mkdir -p %s' % ('/'.join(path.split('/')[:-1])))


class PlotCfg(object):
Example #2
0
from subtlenet import config
from subtlenet.generators import gen as generator
from subtlenet.utils import set_processor
config.limit = 100
generator.truncate = 5
set_processor("gpu")