Skip to content

Conversation

voropz
Copy link
Contributor

@voropz voropz commented Dec 7, 2021

Signed-off-by: voropz [email protected]

Signed-off-by: voropz <[email protected]>
Signed-off-by: voropz <[email protected]>
@voropz voropz marked this pull request as ready for review December 9, 2021 16:25
@voropz voropz changed the title [WIP] Split layer in python Split layer in python Dec 9, 2021
@staticmethod
def __sizes_to_array(sizes) -> numpy.ndarray:
sizes = numpy.array(sizes, dtype=numpy.int32)
if sizes.ndim != 1 or sizes.size > 3:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have the upper limit of 3 here? It should be up to 31...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, it was in the original layer. But that's a mistake! It should be 31. (MathEngine can handle split/merge with up to 32 parts).

outputs.append(0)
elif isinstance(i, (list, tuple)) and len(i) == 2 and isinstance(i[0], Layer) and isinstance(i[1], int):
if int(i[1]) < 0 or int(i[1]) >= i[0].output_count():
if int(i[1]) < 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this? Looks like a bug...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ты письмо читал?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants