Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Force features to be floats instead of doubles #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ritwik12
Copy link

@ritwik12 ritwik12 commented Feb 24, 2020

As per #7 , Make predictions give errors for various tensors as expected dtype double does not equal original dtype float. With suggestions from @caitlynlee Forcing tensors to be floats instead of doubles in astronet/predict.py solves the issue.

115: global_view =  preprocess.global_view(time, flux, FLAGS.period).astype(np.float32)
...
120: local_view = preprocess.local_view(time, flux, FLAGS.period, FLAGS.duration).astype(np.float32)  

As per @caitlynlee in google-research#7 , Make predictions give errors for various tensors as `expected dtype double does not equal original dtype float`. Forcing tensors  to be floats instead of doubles in `astronet/predict.py ` solves the issue.

```
115: global_view =  preprocess.global_view(time, flux, FLAGS.period).astype(np.float32)
...
120: local_view = preprocess.local_view(time, flux, FLAGS.period, FLAGS.duration).astype(np.float32) 
```
@themison
Copy link

themison commented May 4, 2020

dont work for me

@ritwik12
Copy link
Author

ritwik12 commented May 4, 2020

@themison What errors do you see?

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

Successfully merging this pull request may close these issues.

2 participants