-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Hi there,
I'm trying to use your code, it seems quite nice.
The preprocessing works well, but when run RNN.py with DEBUG enabled, the program crashes with 'X' is not defined' errors.
It crashes here:
l_in = L.InputLayer(shape=(batch_size, None, num_features))
#l_in = L.InputLayer(shape=(None, None, num_features)) #compile for variable batch size; slower
# (batch_size, max_time_steps, n_features_1, n_features_2, ...)
# Only stochastic gradient descent
if debug:
get_l_in = theano.function([l_in.input_var], L.get_output(l_in))
l_in_val = get_l_in(self.X)
print(get_l_in)
print(l_in_val)
print('output size: ', end='\t');
print(self.Y.shape)
print('input size:', end='\t');
print(self.X[0].shape)
print('l_in size:', end='\t');
print(l_in_val.shape)
What is the X supposed to be? I would guess it's a single input vector, not the whole dataset, right?
If I give it just the first element of the test set X_test[0], I get an error:
TypeError: ('Bad input argument to theano function with name "src/RNN_tools.py:68" at index 0(0-based)', 'Wrong number of dimensions: expected 3, got 2 with shape (364, 26).')
I don't really understand what I should pass as 'X', could you explain that?
Reactions are currently unavailable