Connect.java for Human Face

25 views
Skip to first unread message

dhye

unread,
May 31, 2012, 4:42:19 PM5/31/12
to ai_co...@googlegroups.com


--
Best,
Daihua Ye
College of Letter and Science,
University of California, Davis
B.S. Computer Science


Connect.java

dhye

unread,
May 31, 2012, 4:51:20 PM5/31/12
to ai_co...@googlegroups.com

tbrounst

unread,
Jun 1, 2012, 4:44:52 PM6/1/12
to AI_Connect
Hey! I just wanted to hear how progress was going. I've been working
on the report but I can't do much more until we get code working. Is
there anything else I can do to help?

Tom
> On Thu, May 31, 2012 at 1:42 PM, dhye <d...@ucdavis.edu> wrote:
>
> > --
> > Best,
> > Daihua Ye
> > College of Letter and Science,
> > University of California, Davis
> > B.S. Computer Science
> > d...@ucdavis.edu | (408)-386-7053
>
> > My Portfolio <http://daihuaye.com>
>
> --
> Best,
> Daihua Ye
> College of Letter and Science,
> University of California, Davis
> B.S. Computer Science
> d...@ucdavis.edu | (408)-386-7053
>
> My Portfolio <http://daihuaye.com>

dhye

unread,
Jun 1, 2012, 4:47:44 PM6/1/12
to ai_co...@googlegroups.com
Can you see the problem of inconsistency output for the same input? I am confuse about why it happens. 


--
You received this message because you are subscribed to the Google Groups "AI_Connect" group.
To post to this group, send email to ai_co...@googlegroups.com.
To unsubscribe from this group, send email to ai_connect+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ai_connect?hl=en.




--
Best,
Daihua Ye
College of Letter and Science,
University of California, Davis
B.S. Computer Science


Thomas Brounstein

unread,
Jun 1, 2012, 6:44:26 PM6/1/12
to ai_co...@googlegroups.com
I've been looking at it and parsing my way through the code.  Unfortunately, I'm unsure how to run it.

That said, I"m a little hesitant about the behavior of forward pass and recall.  Both of them look like they manipulate the underlying network...though really it looks like they're just changing the values of the input-hidden-output nodes and not the edge weights (which is what would be causing the changes).  I'll look some more and see if I figure it out.

Thomas Brounstein

unread,
Jun 1, 2012, 6:59:17 PM6/1/12
to ai_co...@googlegroups.com
Another thought: when a new NeuralLearning object is made, it calls the method randomizedWeights.  Well, at the start of Main we create a new NeuralLearning object; I wonder if it's running randomizedWeights and using that to over ride the weights of the input neural network.  Additionally, when we run main we create a new NeuralLearning called neural.  In running a test we want to supply the program with our own NeuralLearning (one we generated previously).  I don't see where we replace "neural" with the NeuralLearning we generated previously.  It looks like, instead, "neural" is just the new NeuralLearning object with randomly generated weights.

Tom

dhye

unread,
Jun 1, 2012, 8:40:48 PM6/1/12
to Thomas Brounstein, ai_co...@googlegroups.com
Hi Tom,

You are right, the problem of getting a different value is because I did not create a new NeuralLearning Object that use the "test.neural". Now, after fix this problem with using the previous "test.neural" to create a neuralLearning object with previous weight, Connect.java have the consistency value in the test.

So thank you for pointing out that.


On Fri, Jun 1, 2012 at 4:13 PM, dhye <dh...@ucdavis.edu> wrote:
BTW, the way to run the code is 

first, compile it:
javac Connect.java

Second, run with examples
java Connect -train Female/*.txt Male/*.txt

Third, it can test it with this command:
java Connect -test test/*.txt



Connect.java
Connect.class

dhye

unread,
Jun 1, 2012, 8:51:23 PM6/1/12
to Thomas Brounstein, ai_co...@googlegroups.com
Hi,

I open all the images in the test file and manually label the result for the images. 

Here is the result I get from the test:

9.txt, Female, 0
8.txt, Male, 1
7.txt, Male, 1
6.txt, Male, 1
5.txt, Male, 1
40.txt, Male, 1
4.txt, Male, 1
39.txt, Male, 1
38.txt, Male, 1
37.txt, Male, 1
36.txt, Female, 0
35.txt, Female, 0
34.txt, Female, 0
33.txt, Female, 0
32.txt, Female, 0
31.txt, Female, 0
30.txt, Male, 1
3.txt, Male, 1
29.txt, Male, 1
28.txt, Male, 1
27.txt, Male, 1
26.txt, Male, 1
25.txt, Male, 1
24.txt, Male, 1
23.txt, Male, 1
22.txt, Male, 1
21.txt, Male, 1
20.txt, Male, 1
2.txt, Male, 1
19.txt, Male, 1
18.txt, Male, 1
17.txt, Male, 1
16.txt, Male, 1
15.txt, Male, 1
14.txt, Male, 1
13.txt, Male, 1
12.txt, Male, 1
11.txt, Male, 1
10.txt, Male, 1
1.txt, Male, 1
test_result.txt

dhye

unread,
Jun 2, 2012, 3:20:41 AM6/2/12
to Thomas Brounstein, ai_co...@googlegroups.com
Our code is still not working. It output all 1 or 0.5. It does not matter hidden nodes are 4 or 3. I am debugging. 

I check the weight between InputNodes and Hidden nodes are showed like:


-0.4163972 -0.033518642 -0.06692931 
-0.17339796 -0.47729293 0.15944296 
-0.07559389 -0.49864313 0.3634023 
0.09183085 0.42440486 -0.4376967 
0.13798869 -0.020184219 0.41971022 
0.36927378 0.22170097 -0.041680336 
0.16361624 0.37312233 -0.42396492 
-0.01616332 0.13210028 0.38027304 
-0.29213065 0.3297658 0.022142708 
-0.4882153 -0.4857897 0.27206308 
-0.047113717 -0.26938063 0.39040202 
-0.096156746 0.31632102 0.3547479 
-0.40610617 0.01463002 -0.08343649 
...

There are three columns. each column mean the weight between an input node and one of hidden nodes. First column is the weight between input node and the first hidden node, second column is weight between the input node and second hidden node, etc. 

I don't know what it mean. Do you think the negative values of weights are incorrect? or not?


On Fri, Jun 1, 2012 at 11:20 PM, Thomas Brounstein <tbro...@ucdavis.edu> wrote:
So, I'm not sure I follow.  Is the code working accurately?  Also, the three hidden nodes was sort of arbitrary; if we have time let's try this with more or less hidden nodes to see if we can get a better solution.


On Fri, Jun 1, 2012 at 8:50 PM, dhye <dh...@ucdavis.edu> wrote:
The label for the result of files in the test folder are correct.


On Fri, Jun 1, 2012 at 6:28 PM, dhye <dh...@ucdavis.edu> wrote:
The result shows all 0.5, while I run the test. I use all the train files in the Male and Female and use 3 hidden nodes. 


On Fri, Jun 1, 2012 at 6:08 PM, Thomas Brounstein <tbro...@ucdavis.edu> wrote:
Did we label it with 100% accuracy?

dhye

unread,
Jun 2, 2012, 3:44:31 PM6/2/12
to Thomas Brounstein, ai_co...@googlegroups.com
Hi Tom,

List the mean and standard deviation of the training and test accuracies. What is the formula for that in Math?

dhye

unread,
Jun 2, 2012, 6:50:30 PM6/2/12
to Thomas Brounstein, ai_co...@googlegroups.com
Hi Tom,

I hope you can often check your email today and tomorrow, because I need you to keep track of what is going on about the process of our project. I need some help for you. I have work on the whole day. Thanks.


List the mean and standard deviation of the training and test accuracies. What is the formula for that in Math? It is No.2 in the project.
Reply all
Reply to author
Forward
0 new messages