View flax_mem_leak.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple demonstration of memory leak. | |
XLA_PYTHON_CLIENT_PREALLOCATE=false CUDA_VISIBLE_DEVICES=0 python flax_mem_leak.py | |
Breaks on last iter through loop. | |
# Tested on version: | |
Name: flax | |
Version: 0.4.1 | |
Summary: Flax: A neural network library for JAX designed for flexibility |
View different_smiles_same_fp.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View split_reagents.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Module for identifying for RDKit functions working with reaction SMILES strings. | |
""" | |
import collections | |
import itertools | |
import functools | |
import typing |
View tf_control_dep_demo2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
def main1(): | |
sess = tf.Session() | |
x = tf.Variable(1.) | |
sess.run(tf.initialize_variables([x])) |
View tf_control_dep_demo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import tensorflow as tf | |
def main1(): | |
x = tf.get_variable("x", initializer=np.float64(0)) | |
x_id = tf.identity(x) | |
x_rd = x.read_value() | |
x_p0 = x + 0 | |
with tf.control_dependencies([x_id, x_rd, x_p0]): |
View gpdnns.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data as mnist_input_data | |
import numpy as np | |
from sklearn import cluster | |
from scipy.spatial import distance | |
import pandas as pd |
View bayesian_optimisation_simple_demo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import enum | |
import numpy as np | |
from scipy import stats | |
import fire | |
import matplotlib | |
matplotlib.use('TkAgg') | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import Button |
View mnist_gpdnn_example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data as mnist_input_data | |
import numpy as np | |
from sklearn import cluster | |
from scipy.spatial import distance | |
import pandas as pd |
View mixture_of_gaussians_morphing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Code for Figure 1c of | |
Saul, L.K. and Jordan, M.I., 1997. A variational principle for model-based morphing. | |
In Advances in Neural Information Processing Systems (pp. 267-273). | |
Note not exactly the same setup and do not know settings of ell and variance to use | |
Also not sure how to deal with the change points | |
Written in a bit of a rush and not thoroughly tested so use with caution | |
""" |
View gaussian_morphing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Code for Figure 1a of | |
Saul, L.K. and Jordan, M.I., 1997. A variational principle for model-based morphing. | |
In Advances in Neural Information Processing Systems (pp. 267-273). | |
""" | |
import numpy as np | |
from scipy.integrate import odeint | |
from scipy.optimize import fsolve | |
from scipy import stats |
NewerOlder