Giter Club home page Giter Club logo

Comments (7)

owulveryck avatar owulveryck commented on June 12, 2024

@chewxy helped a lot with this investigation.

He told me to add extra logging to extract some information of the VM of Gorgonia

// ...
   gorgonia.Let(g.ByName("Input3")[0], t)
    logger := log.New(os.Stderr, "", 0)
    machine := gorgonia.NewTapeMachine(g, gorgonia.WithLogger(logger), gorgonia.WithWatchlist())
    if err = machine.RunAll(); err != nil {
        log.Fatal(err)
    }
// ...

Thanks to the logs, we can notice that the execution is OK and that the operators are correctly applied; the error I mentioned in the first comment was actually just related to the format command that rounds the numbers.

We are now thinking that the Conv2D operator should be the origin of the problem.
@chewxy pointed out that the shape of the filter was "strange" ((8, 1, 5, 5)). He thinks that it should be ((1,8,5,5)).

The original implementation of the neural network is here.

I am now trying to isolate and test the Conv2D operator to see if the parameters I gave him are ok.

from gorgonnx.

owulveryck avatar owulveryck commented on June 12, 2024

The convolution operator is not working, probably a bug in the padding mechanism and probably a bug into Gorgonia:

go test -run=ConvOp
--- FAIL: TestConvOp (0.00s)
    conv_test.go:131:
                Error Trace:    conv_test.go:131
                Error:          Not equal:
                                expected: ⎡ 12   21   27   33   24⎤
                                ⎢ 33   54   63   72   51⎥
                                ⎢ 63   99  108  117   81⎥
                                ⎢ 93  144  153  162  111⎥
                                ⎣ 72  111  117  123   84⎦

                                actual  : ⎡  0    0    0    0    0⎤
                                ⎢  0    0    0    6   72⎥
                                ⎢129   51  108  165   39⎥
                                ⎢120  101   76  137   35⎥
                                ⎣126  129   53  118   69⎦

                                Diff:
                Test:           TestConvOp
                Messages:       Bad result for the convolution operator
    conv_test.go:132: ⎡  0    0    0    0    0⎤
        ⎢  0    0    0    6   72⎥
        ⎢129   51  108  165   39⎥
        ⎢120  101   76  137   35⎥
        ⎣126  129   53  118   69⎦

FAIL
exit status 1
FAIL    github.com/owulveryck/gorgonnx  0.017s

from gorgonnx.

owulveryck avatar owulveryck commented on June 12, 2024

The conv operator has been fixed in Gorgonia: gorgonia/gorgonia#233

The vendor directory has been updated in consequence

from gorgonnx.

chewxy avatar chewxy commented on June 12, 2024

Please keep this open. There is one fix for col2im (for backprop) that needs to go in first. Gimme about 2 hrs

from gorgonnx.

chewxy avatar chewxy commented on June 12, 2024

Actually I just finished a simple check. The col2im op looks ok (if a little aggressive)

from gorgonnx.

chewxy avatar chewxy commented on June 12, 2024

hm. still not working?

from gorgonnx.

owulveryck avatar owulveryck commented on June 12, 2024

The unit test of my implementation passes; I will close this issue.
I still don't have the good result at the very end of the computation of the MNIST graph, but now I can go to bug hunting again. Many thanks again for you help

from gorgonnx.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.