Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

shame on the developers #217

Closed
vadinabronin opened this issue May 31, 2024 · 5 comments
Closed

shame on the developers #217

vadinabronin opened this issue May 31, 2024 · 5 comments

Comments

@vadinabronin
Copy link

before you make your crap public, first test it for errors, here is the model code and then the code where I try to download it and run the tensor through it

class LSTMNetwork(nn.Module):
def init(self, input_size, hidden_size, output_size):
super(LSTMNetwork, self).init()
self.hidden_size = hidden_size
self.lstm = nn.LSTM(input_size, hidden_size)
self.fc = nn.Linear(hidden_size, output_size)
self.sigmoid = nn.Sigmoid()

def forward(self, input_seq):
    lstm_out, _ = self.lstm(input_seq)
    output = self.fc(lstm_out[:,-1,:])
    output = self.sigmoid(output)
    return output

package main

import (
"fmt"
"io/ioutil"
"github.com/owulveryck/onnx-go"
"github.com/owulveryck/onnx-go/backend/x/gorgonnx"
"gorgonia.org/tensor"
)

func main() {
backend := gorgonnx.NewGraph()
model := onnx.NewModel(backend)

b, _ := ioutil.ReadFile("model.onnx")
err := model.UnmarshalBinary(b)
if err != nil {
	fmt.Println(err)
    return
}
fmt.Println(model)

input := tensor.New(tensor.WithBacking(tensor.Range(tensor.Float32, 0, 81 * 5)), tensor.WithShape(1, 5, 81))
fmt.Println(
model.SetInput(0, input)
err = backend.Run()
if err != nil {
	fmt.Println(err)
    return
}
output, _ := model.GetOutputTensors()
fmt.Println(output[0])

}

an error occurs onnx: operator Shape not implemented (), I can’t find any other explanation for the occurrence of this error other than the stupidity of the developers of this library, the model is absolutely correct and has been preserved in onnx.

@owulveryck
Copy link
Owner

What is the purpose of your comment?

@vadinabronin
Copy link
Author

my purpose is what going on in your library, why i get error in easy example, did you test your library or no?

@vadinabronin
Copy link
Author

I'm sorry it bombed me, I just hate it when errors like this occur in public libraries

@vadinabronin
Copy link
Author

onnx: operator Shape not implemented () - what is what is operator Shape i dont have operator shape in my model

@owulveryck
Copy link
Owner

I understand that you might be new to the business and still gaining experience, so I will overlook the issues with communication this time. However, I hope you use this opportunity to learn and improve.

Open source is much more than just sharing code. It involves dedicating time to the community to enhance and improve projects.

I developed this library a few years ago during my spare time, working nights because I genuinely believed in the concept of self-sufficient deep-learning models. I thought Go could serve as a portable inference engine, simplifying the operations part (what we now call MLOps).

I did my best to run tests, but the development of ONNX progressed much faster than I could keep up with (Microsoft had teams of developers working on it, while I was mostly alone).

I left this project open because, even though I don't have time to maintain it, I believe it could still be useful to people like you. I assume you have a use case if you're trying to use this project.

With that said, I apologize for not setting a notice in the README earlier, indicating that I am no longer actively maintaining the project. I didn't do it because I kept hoping someone would take over and continue its development.

Now, to address your questions: when I built the library, I conducted many tests based on the context at that time. Obviously, I didn't test everything, and practices like TDD might not have helped much. Regarding you error, there is probably a Shape operator somewhere, maybe due to the onnx serialization, or it is a bug, I don't know.

I guess that it is time to archive this project though.

And one last piece of advice: be kind to people, think before you speak, and read before you think. Your comment hurt can hurt people, and certainly hurt me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants