Initialization.py 753 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
29
30
#!/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

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