On Mon, Apr 27, 2015 at 2:24 PM, Detlef Schmicker <d...@physik.de> wrote:

> Sorry, it is not,
>
>
> but I offer my trained DCNN http://physik.de/net.tgz
>
> it has about 44% prediction rate and uses only the position....
>
> it a a caffe file which is quite easy to use:
>
>

Sorry to reply to a message that that’s over a year old. I just managed to
integrate Caffe with my Go bot which is written in Rust. Unfortunately the
Rust binding doesn’t return the output of the net when I run the forward.
Instead it requires me to find the right blob my name. Looking at the
prototxt file I assumes that the blob would be named softmax, but when I do
that I get an error. That could either mean that I just picked the wrong
blob (could it be ip or ip_zw?) or that getting the blob isn’t even enough
to get at the output.

Does anybody who tried out this net remember what they did to get it to
work? I know it’s a long shot but it would be great if I could get this to
work. Or rather I have this working but I don’t even know if I’m even using
data that does make sense.

Cheers,

Urban


> void Engine::getCNN(Go::Board *board,Go::Color col, float result[])
> {
>   int size=board->getSize();
>     float *data;
>     data= new float[2*size*size];
>     //fprintf(stderr,"2\n");
>     if (col==Go::BLACK) {
>       for (int j=0;j<size;j++)
>         for (int k=0;k<size;k++)
>           {//fprintf(stderr,"%d %d %d\n",i,j,k);
>           if (board->getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
>               {
>               data[j*size+k]=1.0;
>               data[size*size+size*j+k]=0.0;
>               }
>           else if
> (board->getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)
>               {
>               data[j*size+k]=0.0;
>               data[size*size+size*j+k]=1.0;
>               }
>           else
>               {
>               data[j*size+k]=0.0;
>               data[size*size+size*j+k]=0.0;
>               }
>         }
>     }
>     if (col==Go::WHITE) {
>       for (int j=0;j<size;j++)
>         for (int k=0;k<size;k++)
>           {//fprintf(stderr,"%d %d %d\n",i,j,k);
>           if (board->getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
>               {
>               data[j*size+k]=0.0;
>               data[size*size+size*j+k]=1.0;
>               }
>           else if
> (board->getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)
>               {
>               data[j*size+k]=1.0;
>               data[size*size+size*j+k]=0.0;
>               }
>           else
>               {
>               data[j*size+k]=0.0;
>               data[size*size+size*j+k]=0.0;
>               }
>     }
>     }
>
>
>   Blob<float> *b=new Blob<float>(1,2,size,size);
>   b->set_cpu_data(data);
>   vector<Blob<float>*> bottom;
>   bottom.push_back(b);
>   const vector<Blob<float>*>& rr = caffe_test_net->Forward(bottom);
>   //for (int j=0;j<19;j++)
>     //{
>     //for (int k=0;k<19;k++)
>     //    {
>     //    fprintf(stderr,"%5.3f ",rr[0]->cpu_data()[j*19+k]);
>     //    }
>     //fprintf(stderr,"\n");
>     //}
>   for (int i=0;i<size*size;i++) {
>       result[i]=rr[0]->cpu_data()[i];
>     if (result[i]<0.00001) result[i]=0.00001;
>   }
>   delete[] data;
>   delete b;
>
> }
>
>
>
> Am 27.04.2015 um 13:44 schrieb Petr Baudis:
>
>> On Mon, Apr 27, 2015 at 12:35:05PM +0200, Detlef Schmicker wrote:
>>
>>> I dont see a reason, why there should be any problems using it with
>>> DNN on 19x19 trained network. If a 25x25 will be sheduled, I will
>>> take part :)
>>>
>> I'm sorry for being unclear!  I actually meant DCNN as a standalone
>> player, not part of MCTS.  Is it possible to run oakfoam's DCNN
>> implementation like that?  (Have you measured its stength?)
>>
>> Thanks,
>>
>>                                 Petr Baudis
>> _______________________________________________
>> Computer-go mailing list
>> Computer-go@computer-go.org
>> http://computer-go.org/mailman/listinfo/computer-go
>>
>>
> _______________________________________________
> Computer-go mailing list
> Computer-go@computer-go.org
> http://computer-go.org/mailman/listinfo/computer-go
>



-- 
Blog: http://bettong.net/
Twitter: https://twitter.com/ujh
Homepage: http://www.urbanhafner.com/
_______________________________________________
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Reply via email to