Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add rnn basic modules #1097

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

Merged
merged 3 commits into from
Jun 7, 2023
Merged

Conversation

AsakusaRinne
Copy link
Collaborator

  1. Refactor Tensors to make it support nested structure.
  2. Add Nest<T> and INestStructure<T> to enable better use of nest structures.
  3. Add basic RNN modules.
  4. Revise the implementation of TensorArray.

Note:
The ILayer.Call needs to be fully refactored in the future.

@DevNullx64 This PR partially refactors the Tensors, which is mentioned in #1088 . Please feel free to comment anything about that :). Since the target branch is a dev branch, this PR will be merged at once. But if there's disadvantages you catch, we could improve it before merging to master branch.

In this PR the implicit conversion from Tensors to Tensor is still kept because the main purpose of this PR is to support RNN. However I add a check when doing this implicit conversion. If a Tensors has more than one Tensor, then an exception will be thrown. In this way, some error will be visiable.

@AsakusaRinne AsakusaRinne requested a review from Oceania2018 as a code owner June 7, 2023 00:22
@AsakusaRinne AsakusaRinne merged commit 9da157f into SciSharp:rnn-dev Jun 7, 2023
@DevNullx64
Copy link
Contributor

DevNullx64 commented Jun 7, 2023

Quite not sure, but I think that by adding some class or interface, Nest can hold less. By exemple what is done with the NestType may, prehaps, done by splitting or generic type handling. I seen that "NestType.Node" can't use PackSequenceInternal(). Change class architecture can prehaps avoid possibility to call PackSequenceInternal() from a Nest that should currently have NestType.Node.

I hope to don't borring you to many, I will help you if you want.

After that, you've done a lot of work :) !
I'm loking for this pull.

Ho ! Before I forgot ! Well handling for Tensors to Tensor. it's verry helpfull for debuging :)

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

Successfully merging this pull request may close these issues.

2 participants