Git Product home page Git Product logo

anna's People

Contributors

dleebrown avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

anna's Issues

Duplicate tensor op name issue

Problem in ANNA_test - ANNA_train is imported to use helper functions for preprocessing and to avoid bloating the list of things that need updating when a function is changed. But tensorflow graph is read in as well when ANNA_train is read in, so when saved metagraph is imported, ANNA_test fails because the variable names already exist.

Possible solutions:

  1. Try running in a different session in ANNA_train, then the ANNA_test graph will be imported but unused.
  2. Move helper functions to a separate .py file and import that.
    Both of the above will need to deal with the fact that the queue op is buried in a python function.
  3. Move copies of helper functions to ANNA_test. This is not ideal since it will generate redundant copies of the functions.
  4. Make a separate architecture file. This is basically the inverse of solution 1, and has the same problems.

Look into stability of weight initialization.

Under more extensive testing, it looks like the weight initialization in v0.1.0, which follows the He+ (2015) weight initialization scheme, is unstable under certain training conditions, namely low absolute variance in the input data (e.g. training on a <1000 K temperature range).

  1. Is this a bug? Is my weight initialization incorrect vs He+?
  2. If not a bug, redo the weight initialization to make the training process more stable.

For now, rolling back to the previous weight initialization scheme, which is just based on the incoming dimensionality to each layer.

Arbitrary number of stages during training

Should be an easy feature to implement - just put the second through n stages inside a loop, where the program first checks to see if "DO_TRAIN(n)" exists in the parameter file and if so fetches LEARN_RATE(n), etc, and runs training, otherwise returns.

Expand fits IO capability

Probably want to make this as flexible as possible - think about adding in fields in the parameter file to:

  1. specify which header keywords correspond to what
  2. only select certain rows in a multispec file
  3. specify keyword for actual IDs, rather than fits row numbers

Basic testing capability

Need to write a function to test ANNA - similar to the older version of the code, it would be good to read and parse a binary file, run it through ANNA, and then print some sort of summary statistics.

Better error catching

Add some exceptions to catch missing parameter errors, etc, and kill the python process and all threads. Having an issue with zombie threads if the program crashes during run.

need single fits image reader

Readmultispec doesn't work on single fits images. This may not be worth working on since the format of the fits images isn't going to be standardized.

wavelength-dependent continuum error

Might be nice to implement some sort of wavelength-dependent continuum error scheme. Could provide a template of similar form to the SN relative error template - user provides 2-column text file with wavelength, relative continuum error, then provides (using existing parameter) the continuum error to use for relative error = 1.0.

As with SN, the code can read in the template and interpolate the template linearly onto the training wavelength grid.

First release, future plans

After testing, I think ANNA is ready for an initial v0.1 release.

In the pipeline, I think it's worth exploring switching to a FCN architecture, as the accuracy should be about the same but the training/inference speed should be much faster due to many fewer free parameters.

Weight initialization bug

The way the weights are initialized is incorrect, compared with the scheme in He (2015). This doesn't impact the network too much since it's pretty shallow, but it needs to be fixed.

Make number of trained parameters more flexible

Instead of getting rid of the option to select number of output parameters, actually make it meaningful (instead of virtually locked to be 5).

Make it changeable, and add a field in the parameter file that contains the names of each of these parameters in order.

Edit the manual to reflect that the normalization numbers must be in the order specified by the text field added and must correspond to the number of output parameters selected when building the architecture.

Modify how the output files are written.

Change the radv field to be a dummy parameter in general (it already is) and modify the manual to note this and instruct users to set it to anything they want if they aren't going to use it.

Timeline output broken

Not sure why. It just outputs an empty json file now. Probably first thing to do is test it on Sputnik with the code as-is and see if it's different there. Could be a no-chrome thing.

Tensorboard during training

Add ability to automatically open a tensorboard session and dynamically print training progress - error, etc.

multiple text file readin

Maybe just add capability to read in multiple text files for inference at once - separate the names with commas?

Multi stage training

Finish implementing the ability to do training in several stages with different learning parameters. Possibly integrate with the early stopping feature to automatically start second stage of training once early stopping kicks in for the first stage.

Early stopping and cross-validation

Modify the training function to do more testing diagnostics during the training process. Specify a separate binary file to use as watchlist and define some sort of early stopping parameter that will stop training once error stops improving for some number of iterations.

Fits image IO

Need to add the ability to read in fits images and pass them in the form needed by the feedforward function. Probably safe to assume that for now, only multispec fits images will be needed. For now just put in the basic functionality - read in an image, use all lines in the image as separate inputs, return the line of each spectra along with its inferred parameters.

Feedforward capability

Need to build a function to load a previously trained model and run data through, putting the results in a file. Would be best to write this as taking input of a standard form, so that I can test it on binary inputs using existing functions, but later on write some sort of function that will do fits IO

Preprocessing stalling GPU

Right now the code is set to do preprocessing on a single thread and then passing batches to the gpu. Looks like there's something with the GIL not being released quickly enough or the preprocessing taking too long relative to the time to do the gpu compute. Spawing more preprocessing threads doesn't solve the issue, so it's not an IO bottleneck. This is a nontrivial issue that might require looking into multitprocess preprocessing, rather than threading.

bug in readmultispec

It's picking something up in some fits files I load in that cause it to think the spectra are redshifted. Easiest solution would be to hardcode the redshift to be 0 but this might lead to problems down the road.

major bug in preprocessing queue

The queue is not properly switching to the cross-validation queue. ANNA reads the xval data from the main training queue, rather than the xval queue. Also the master queue switcher was not set to switch to the cross-validation queue.

Try out fourier-transformed inputs

May result in speedups. May also result in easier time determining things that depend on line profile widths (rather than neighboring pixel values) like rotV. Sort of low priority since it's just an experiment.

more flexible readin

Add the ability to make data readin for inference more flexible. Probably make it so that there is a parameter that can specify another python file that will return an array of fluxes/wavelengths. Then when running, just have the code import that python file and run it, storing the results in the data that will be fed through the network.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.