Skip to content
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

creating createResNetModel1D #10

Closed
mg64ve opened this issue Dec 22, 2019 · 5 comments
Closed

creating createResNetModel1D #10

mg64ve opened this issue Dec 22, 2019 · 5 comments

Comments

@mg64ve
Copy link

mg64ve commented Dec 22, 2019

Hello, interesting project, thanks for sharing.
I am trying to write createResNetModel1D.
I have just taken createResNetModel2D and tried to convert to 1D layers.
I have some doubts on the following lines in squeezeAndExciteBlock2D:


    if( K$image_data_format() == "channels_first" )
      {
      block <- block %>% layer_permute( c( 4, 2, 3 ) )
      }
    x <- list( initial, block ) %>% layer_multiply()

I am using the following instead of c(4, 2, 3):

layer_permute( c( 4, 3 ) )

Not sure if it might be correct. What is the meaning of this permutation and when is supposed to be applied?

@ntustison
Copy link
Member

@mg64ve --- good question. Unfortunately, my experience with both the squeeze-and-excite block as well as 1-D convolutional architectures are very limited. In fact, I haven't had a chance to test this yet. Since the 2-D case is

layer_permute( c( 4, 2, 3 ) )

and the 3-D case is

layer_permute( c( 5, 2, 3, 4 ) )

I suspect the 1-D case would be

layer_permute( c( 3, 2 ) )

but I'd have to do some more testing/thinking to be sure.

@mg64ve
Copy link
Author

mg64ve commented Dec 24, 2019

Thanks @ntustison
It seems to work.
If I have time to document and add an example I will create a pull request, I guess it might be useful for someone else.
However now I would like to transform createResNetModel1D 1D ResNet CNN neural network model in an autoencoder.
Any good idea on how to make it?

@ntustison
Copy link
Member

Sorry, I don't. We have a couple of autoencoder code snippets but I haven't translated any of them to 1-D.

@mg64ve
Copy link
Author

mg64ve commented Dec 26, 2019

Ok @ntustison , but do you have 2D or 3D resnet autoencoder?

@ntustison
Copy link
Member

No, we don't have that architecture implemented.

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

No branches or pull requests

2 participants