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

one dimension data #1

Open
wxw-cyber opened this issue Mar 21, 2022 · 1 comment
Open

one dimension data #1

wxw-cyber opened this issue Mar 21, 2022 · 1 comment

Comments

@wxw-cyber
Copy link

Hello, how do I use tfvan if my data is one dimensional?

@shkarupa-alex
Copy link
Owner

Hello, in the same way as any other backbone in keras_application.
There are two options:

  1. You can repeat your data 3 times across channel dimension and then concat. (I think this is the easiest option)
  2. You can transfer pretrained weights to empty model with 1-channel input:
  • create 2 models (1 with pretrained weights and 3 channels, 1 with random init and 1 channel)
  • find weights in these two models with different shape (first conv weighs)
  • sum that weight accross channel dim
  • use this summed weight and all other weights from pretrained model and set them to model with 1 weight: model.set_weights([..])

P.S.
Try to search in google how to do that for some backbone like keras resnet50. For tfvan alghoritm will be the same.

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