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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
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])) |
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]): |
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 |
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 |
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 |
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 | |
""" |
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