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

Conversion of fetch to PyTorch #40

Open
aweaver1fandm opened this issue Dec 4, 2024 · 0 comments
Open

Conversion of fetch to PyTorch #40

aweaver1fandm opened this issue Dec 4, 2024 · 0 comments

Comments

@aweaver1fandm
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As part of the discussion of moving from Keras2 to Keras3, see #36 (comment)

Describe the solution you'd like
I have begun the conversion to using PyTorch but I have some questions regarding your original implementation. Feedback on this conversion would be most appreciated. My implementation can be found here:
https://github.com/aweaver1fandm/fetch/tree/pytorch

The implementation is not yet complete but is at a point where I can't proceed further until I'm sure it's moving in the correct direction.

  1. Is the transfer training procedure (found in fetch/transfer_train.py) correct. I was unsure about the number of epochs when a layer is unfrozen. I tried to implement what you wrote in the paper but it was a bit vague when it came to the part about unfreezing layers

  2. Does the data preparation (found in _data_from_h5 in fetch/puslar_data.py) seem to match what you originally did?

  3. In the paper you talk about unfreezing layers, but based on the picture in that paper the term "layer" is a bit ambiguous and depends on the architecture of the CNN. That is, for example, it would be different for densenet architectures compared to vgg architectures.
    a. Is that a correct interpretation of what you meant?
    b. Do the custom unfreeze functions in fetch/model.py seem to capture that meaning?

  4. Based on your code, it seems that Guassian noise is only added to the freq data. Is that correct?

  5. Do the model setups for transfer training an individual CNN (see TorchVisionModel in fetch/model.py) look correct in terms of matching how you modified them?
    For transfer training I purposefully used an output layer with one neuron, instead of two as you did. This would seem to be the way to go because at this point it's a binary classification problem and the single output is the probability it's a pulsar

I've pulled the training and test data from http://astro.phys.wvu.edu/fetch/. I do an 85/15 random split of the training data for training and validation and use the test data to evaluate once the model is trained.

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

1 participant