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 hidden or 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
| """symbolic helper functions""" | |
| import theano | |
| import theano.tensor as T | |
| import lasagne | |
| from lasagne.layers import * | |
| import numpy as np | |
| def get_mask(tokens,pad_ix=-1): | |
| assert tokens.ndim==2 |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| a bunch of lasagne code implementing gumbel softmax | |
| https://arxiv.org/abs/1611.01144 | |
| """ | |
| import numpy as np | |
| import theano | |
| import theano.tensor as T | |
| from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams | |
| from lasagne.random import get_rng |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hidden or 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
| #http://chemspipy.readthedocs.io/en/latest/guide/install.html | |
| import chemspipy as chpy | |
| token = "<your token from http://chemspipy.readthedocs.io/en/latest/guide/intro.html#securitytoken>" | |
| cs = chpy.ChemSpider(token) | |
| n_samples = 10**5 #amount of molecules to save | |
| import numpy as np |