def input_data(self): from yadll.utils import shared_variable return shared_variable(np.ones((16, 3, 5, 7, 10)))
def input_data(self): from yadll.utils import shared_variable return shared_variable(np.random.random((2, 3, 4, 5)))
def test_shared_variable(): from yadll.utils import shared_variable x = np.asarray(np.random.normal(size=(10, 5))) assert isinstance(shared_variable(x), theano.compile.SharedVariable) assert shared_variable(None) is None