-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: No 'name' attribute for network items #407
Comments
Hi @krooq, Thanks for the using BindsNET, and thanks for the feedback! To answer your questions:
Yes. In fact, I really like this change. I agree that there is redundancy in the naming logic at the moment.
IIUC, this change should cover all use cases. Once a layer is named, the layer's If everyone else agrees that this is a good change, would you mind putting together a PR with this change? On top of updating the |
Sure I can give it a go. |
Thank you for this welcome suggestion. You are right, there is some redundancy in the way we defining the network. Some of this style of code comes from other projects that we wanted to be compatible with their code style. As Dan mentioned, this change should cause major changes in many parts of the project. The transition will take time. |
I was wondering if it would be better to give users the choice of accessing network items using either the name or object itself.
But I do not want to complicate things either. |
@krooq I think I like that idea as well. Could you explain why we might want to move away from strings? Random idea: automatic naming of layers / monitors, for when the user fails to pass in names (e.g., |
@djsaunde in Python (most other languages) objects have a unique int identifier I'm not an expert on the use cases of all the features of BindsNET, perhaps having a string key for Nodes advantageous especially for those that are less exposed to code. I think the automatic naming could be a neat feature.
|
Okay, thanks for the explanation. I think we'll table this idea for now, but I like the discussion.
Yup, that all makes sense. I'll create a separate GitHub issue for this (labeled as an "enhancement") for any discussion related to it. |
BindsNET has a really nice API, its super easy to understand and has a low barrier for entry, massive props to the team.
I found one rough edge that I'd like to understand a little better and maybe propose a change,
i.e. network items have no 'name' attribute.
This example code is a really good starting point and this is what I have been using to learn bindsnet.
I copied the code into my editor and messed around a bit and found after a while that it was getting a bit ugly slinging all these strings around.
I ended up doing something like this to make the code much cleaner and reduce the string duplication
This made the network creation just a few lines and meant I didn't have to sling around all those strings.
Admittedly there are less intense ways to do this like just creating a separate string for layer names but it didn't feel that appealing.
So a few questions
Is it worth adding a name attribute to items that can be attached to a network to clean up the API?
Is my example just a contrived case that doesn't reflect the real world?
The text was updated successfully, but these errors were encountered: