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

Comments

Force features to be floats instead of doubles#12

Open
ritwik12 wants to merge 1 commit intogoogle-research:masterfrom
ritwik12:patch-1
Open

Force features to be floats instead of doubles#12
ritwik12 wants to merge 1 commit intogoogle-research:masterfrom
ritwik12:patch-1

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