It wooeks!!!

thank you, thank you very much!!!

El miércoles, 3 de agosto de 2016, 3:38:36 (UTC+2), Jesse Livezey escribió:
>
> I just changed
>
> salidas_capa3[test_model(i)]
>
> to
>
> salidas_capa3(i)
>
>
> the function salidas_capa3 expects a batch index as an argument.
>
> On Sunday, July 31, 2016 at 3:16:45 PM UTC-4, Beatriz G. wrote:
>>
>> Is it not what I have given to salidas_capa3?
>>
>> I am really thankful for your help, really, really thankful.
>>
>>
>> El viernes, 29 de julio de 2016, 4:00:51 (UTC+2), Jesse Livezey escribió:
>>>
>>> I think you just want to do
>>>
>>> for i in range(n_test_batches):
>>>     test_losses = [test_model(i)]
>>>     y_pred_test = salidas_capa3(i)
>>>     print y_pred_test
>>>
>>>
>>> The salidas_capa3 function expects a minibatch index as an argument.
>>>
>>> On Wednesday, July 27, 2016 at 11:27:08 PM UTC-7, Beatriz G. wrote:
>>>>
>>>> I am not able of extract the value of that function at that point, I 
>>>> have debugged and I I have gotten the results of test_model in the 
>>>> attached 
>>>> pic.
>>>>
>>>> Thank you for your help.
>>>>
>>>>
>>>>
>>>> What is the value of test_model(i) at that point? I think it should be 
>>>>> an array of indices.
>>>>>
>>>>> On Wednesday, July 27, 2016 at 1:52:27 AM UTC-7, Beatriz G. wrote:
>>>>>>
>>>>>> Hi Jesse, thank you for your reply.
>>>>>>
>>>>>> I have tried to use it when I test:
>>>>>>
>>>>>> #Aqui se tiene que cargar la red
>>>>>>
>>>>>> layer0.W.set_value(w0_test)
>>>>>> layer0.b.set_value(b0_test)
>>>>>>
>>>>>> layer1.W.set_value(w1_test)
>>>>>> layer1.b.set_value(b1_test)
>>>>>>
>>>>>> layer2.W.set_value(w2_test)
>>>>>> layer2.b.set_value(b2_test)
>>>>>>
>>>>>> # test it on the test set
>>>>>> for i in range(n_test_batches):
>>>>>>     test_losses = [test_model(i)]
>>>>>>     y_pred_test = salidas_capa3[test_model(i)]
>>>>>>     print y_pred_test
>>>>>>     test_score = numpy.mean(test_losses)
>>>>>>
>>>>>> print((' test error of best model %f %%') % (test_score * 100.))
>>>>>>
>>>>>>
>>>>>>
>>>>>> but I get the following error:
>>>>>>
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "/home/beaa/Escritorio/Theano/Separando_Lenet.py", line 414, in 
>>>>>> <module>
>>>>>>     evaluate_lenet5()
>>>>>>   File "/home/beaa/Escritorio/Theano/Separando_Lenet.py", line 390, in 
>>>>>> evaluate_lenet5
>>>>>>     y_pred_test = salidas_capa3[test_model(i)]
>>>>>>   File 
>>>>>> "/home/beaa/.local/lib/python2.7/site-packages/theano/compile/function_module.py",
>>>>>>  line 545, in __getitem__
>>>>>>     return self.value[item]
>>>>>>   File 
>>>>>> "/home/beaa/.local/lib/python2.7/site-packages/theano/compile/function_module.py",
>>>>>>  line 480, in __getitem__
>>>>>>     s = finder[item]
>>>>>> TypeError: unhashable type: 'numpy.ndarray'
>>>>>>
>>>>>>
>>>>>>
>>>>>> and I do not know what produces it.
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>>
>>>>>> El miércoles, 27 de julio de 2016, 2:29:24 (UTC+2), Jesse Livezey 
>>>>>> escribió:
>>>>>>>
>>>>>>> You should be able to use this function to output y_pred
>>>>>>>
>>>>>>>     salidas_capa3 = theano.function(
>>>>>>>         [index],
>>>>>>>         layer3.y_pred,
>>>>>>>         givens={
>>>>>>>             x: test_set_x[index * batch_size: (index + 1) * batch_size],
>>>>>>>         }
>>>>>>>     )
>>>>>>>
>>>>>>>
>>>>>>> On Monday, July 25, 2016 at 3:09:09 AM UTC-7, Beatriz G. wrote:
>>>>>>>>
>>>>>>>> Hi, anyone knows how to get the test labels that the classifier has 
>>>>>>>> given to the data? 
>>>>>>>>
>>>>>>>> I would like to extrat the data that has not been well classified.
>>>>>>>>
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to