# Path: selfsup/util.py
# class DummyDict(object):
#     def __init__(self):
#         pass
#     def __getitem__(self, item):
#         return DummyDict()
#     def __setitem__(self, item, value):
#         return DummyDict()
#     def get(self, item, default=None):
#         if default is None:
#             return DummyDict()
#         else:
#             return default
# 
# Path: selfsup/util.py
# def tprint(*args, **kwargs):
#     global _tlog_path
#     import datetime
#     GRAY = '\033[1;30m'
#     RESET = '\033[0m'
#     time_str = GRAY+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')+RESET
#     print(*((time_str,) + args), **kwargs) 
# 
#     if _tlog_path is not None:
#         with open(_tlog_path, 'a') as f:
#             nocol_time_str = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
#             print(*((nocol_time_str,) + args), file=f, **kwargs) 


from .util import DummyDict
from .util import tprint
import deepdish as dd
import numpy as np
    import tensorflow as tf
    import tensorflow as tf
                           conv_fc_transitionals=conv_fc_transitionals,
                           info=info, color_layer=color_layer)
            d['0'] = cfW
            saved.append('{}:weights -> {}:0  {}'.format(prefix + p_lay, lay, info.get(lay, '')))

        biases = find_weights(prefix + p_lay, 'biases')
        if biases is not None:
            b = session.run(biases)
            d['1'] = b
            saved.append('{}:biases -> {}:1'.format(prefix + p_lay, lay))

        if d:
            data[lay] = d

        if save_batch_norm:
            mean = find_batch_norm(lay, which='mean')
            variance = find_batch_norm(lay, which='var')

            if mean is not None and variance is not None:
                d = {}
                d['0'] = np.squeeze(session.run(mean))
                d['1'] = np.squeeze(session.run(variance))
                d['2'] = np.array([1.0], dtype=np.float32)

                data['batch_' + lay] = d

                saved.append('batch_norm({}) saved'.format(lay))

    dd.io.save(path, dict(data=data), compression=None)
    if verbose:

# Path: selfsup/util.py
# class DummyDict(object):
#     def __init__(self):
#         pass
#     def __getitem__(self, item):
#         return DummyDict()
#     def __setitem__(self, item, value):
#         return DummyDict()
#     def get(self, item, default=None):
#         if default is None:
#             return DummyDict()
#         else:
#             return default
# 
# Path: selfsup/util.py
# def tprint(*args, **kwargs):
#     global _tlog_path
#     import datetime
#     GRAY = '\033[1;30m'
#     RESET = '\033[0m'
#     time_str = GRAY+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')+RESET
#     print(*((time_str,) + args), **kwargs) 
# 
#     if _tlog_path is not None:
#         with open(_tlog_path, 'a') as f:
#             nocol_time_str = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
#             print(*((nocol_time_str,) + args), file=f, **kwargs) 


# Path: selfsup/caffe.py
from .util import DummyDict
from .util import tprint
import deepdish as dd
import numpy as np
    import tensorflow as tf
    import tensorflow as tf

                           conv_fc_transitionals=conv_fc_transitionals,
                           info=info, color_layer=color_layer)
            d['0'] = cfW
            saved.append('{}:weights -> {}:0  {}'.format(prefix + p_lay, lay, info.get(lay, '')))

        biases = find_weights(prefix + p_lay, 'biases')
        if biases is not None:
            b = session.run(biases)
            d['1'] = b
            saved.append('{}:biases -> {}:1'.format(prefix + p_lay, lay))

        if d:
            data[lay] = d

        if save_batch_norm:
            mean = find_batch_norm(lay, which='mean')
            variance = find_batch_norm(lay, which='var')

            if mean is not None and variance is not None:
                d = {}
                d['0'] = np.squeeze(session.run(mean))
                d['1'] = np.squeeze(session.run(variance))
                d['2'] = np.array([1.0], dtype=np.float32)

                data['batch_' + lay] = d

                saved.append('batch_norm({}) saved'.format(lay))

    dd.io.save(path, dict(data=data), compression=None)
    if verbose:

        tprint('Saved model to', path)