Initialization.py 760 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# @date: Mon 05 Sep 2016 16:35 CEST

import logging
logger = logging.getLogger("bob.learn.tensorflow")


class Initialization(object):
    """
    Base function for initialization.
    """

    def __init__(self, seed=10., use_gpu=False):
        """
        Default constructor

        **Parameters**

         shape: Shape of the input vector
         seed: Seed for the pseudo random number generator
         use_gpu: Variable stored in the GPU
        """

        self.seed = seed
        self.use_gpu = use_gpu

29
    def __call__(self, shape, name, scope):
30
        NotImplementedError("Please implement this function in derived classes")