Skip to content

Commit

Permalink
Changed imports for optimizers
Browse files Browse the repository at this point in the history
  • Loading branch information
peastman committed Aug 22, 2019
1 parent 68e70d3 commit e0453f5
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion contrib/rl/mcts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Monte Carlo tree search algorithm for reinforcement learning."""

from deepchem.models import TensorGraph
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam
from deepchem.models.tensorgraph.layers import Feature, Weights, Label, Layer
import numpy as np
import tensorflow as tf
Expand Down
2 changes: 1 addition & 1 deletion contrib/rl/test_mcts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import deepchem as dc
from deepchem.models.tensorgraph.layers import Reshape, Variable, SoftMax, GRU, Dense
from deepchem.models.tensorgraph.optimizers import Adam, PolynomialDecay
from deepchem.models.optimizers import Adam, PolynomialDecay
import numpy as np
import tensorflow as tf
import unittest
Expand Down
2 changes: 1 addition & 1 deletion contrib/rl/tictactoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import deepchem.rl.envs.tictactoe
from deepchem.models.tensorgraph.layers import Flatten, Dense, SoftMax, \
BatchNorm, Squeeze
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam


class TicTacToePolicy(dc.rl.Policy):
Expand Down
2 changes: 1 addition & 1 deletion deepchem/metalearning/maml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Model-Agnostic Meta-Learning (MAML) algorithm for low data learning."""

from deepchem.models.tensorgraph.optimizers import Adam, GradientDescent
from deepchem.models.optimizers import Adam, GradientDescent
import numpy as np
import os
import shutil
Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/keras_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from deepchem.data import NumpyDataset
from deepchem.models.losses import Loss
from deepchem.models.models import Model
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam
from deepchem.trans import undo_transforms
from deepchem.utils.evaluate import GeneratorEvaluator

Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tensorgraph/tensor_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from deepchem.data import NumpyDataset
from deepchem.models.models import Model
from deepchem.models.tensorgraph.layers import InputFifoQueue, Label, Feature, Weights, Constant, Input
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam
from deepchem.trans import undo_transforms
from deepchem.utils.evaluate import GeneratorEvaluator

Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tensorgraph/tests/test_optimizers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import deepchem.models.tensorgraph.optimizers as optimizers
import deepchem.models.optimizers as optimizers
import tensorflow as tf
from tensorflow.python.framework import test_util

Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tensorgraph/tests/test_tensor_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from deepchem.models.tensorgraph.layers import Feature, Label, Input
from deepchem.models.tensorgraph.layers import ReduceSquareDifference, Add, GRU
from deepchem.models.tensorgraph.tensor_graph import TensorGraph
from deepchem.models.tensorgraph.optimizers import GradientDescent, ExponentialDecay, Adam
from deepchem.models.optimizers import GradientDescent, ExponentialDecay, Adam
from tensorflow.python.eager import context


Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tests/test_overfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import tensorflow as tf
import deepchem as dc
import scipy.io
from deepchem.models.tensorgraph.optimizers import Adam, ExponentialDecay
from deepchem.models.optimizers import Adam, ExponentialDecay
from tensorflow.python.framework import test_util
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
Expand Down
2 changes: 1 addition & 1 deletion deepchem/rl/a3c.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Asynchronous Advantage Actor-Critic (A3C) algorithm for reinforcement learning."""

from deepchem.models import KerasModel
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam
import numpy as np
import tensorflow as tf
import collections
Expand Down
2 changes: 1 addition & 1 deletion deepchem/rl/ppo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Proximal Policy Optimization (PPO) algorithm for reinforcement learning."""

from deepchem.models import KerasModel
from deepchem.models.tensorgraph.optimizers import Adam
from deepchem.models.optimizers import Adam
import numpy as np
import tensorflow as tf
import collections
Expand Down
2 changes: 1 addition & 1 deletion deepchem/rl/tests/test_a3c.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flaky import flaky

import deepchem as dc
from deepchem.models.tensorgraph.optimizers import Adam, PolynomialDecay
from deepchem.models.optimizers import Adam, PolynomialDecay
from tensorflow.keras.layers import Input, Dense, GRU, Reshape, Softmax
import numpy as np
import tensorflow as tf
Expand Down
2 changes: 1 addition & 1 deletion deepchem/rl/tests/test_ppo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flaky import flaky

import deepchem as dc
from deepchem.models.tensorgraph.optimizers import Adam, PolynomialDecay
from deepchem.models.optimizers import Adam, PolynomialDecay
from tensorflow.keras.layers import Input, Dense, GRU, Reshape, Softmax
import numpy as np
import tensorflow as tf
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/MNIST_GAN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source": [
"import deepchem as dc\n",
"import tensorflow as tf\n",
"from deepchem.models.tensorgraph.optimizers import ExponentialDecay\n",
"from deepchem.models.optimizers import ExponentialDecay\n",
"from tensorflow.keras.layers import Conv2D, Conv2DTranspose, Dense, Reshape\n",
"from tensorflow.examples.tutorials.mnist import input_data\n",
"import matplotlib.pyplot as plot\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/pong.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
},
"outputs": [],
"source": [
"from deepchem.models.tensorgraph.optimizers import Adam\n",
"from deepchem.models.optimizers import Adam\n",
"a3c = dc.rl.A3C(env, policy, model_dir='model', optimizer=Adam(learning_rate=0.0002))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/seqtoseq_fingerprint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
"outputs": [],
"source": [
"from deepchem.models.tensorgraph.optimizers import Adam, ExponentialDecay\n",
"from deepchem.models.optimizers import Adam, ExponentialDecay\n",
"max_length = max(len(s) for s in train_smiles)\n",
"model = dc.models.SeqToSeq(tokens,\n",
" tokens,\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/pcba/pcba_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from deepchem.metrics import to_one_hot
from deepchem.utils.evaluate import Evaluator
from deepchem.models import MultitaskClassifier
from deepchem.models.tensorgraph.optimizers import ExponentialDecay
from deepchem.models.optimizers import ExponentialDecay

np.random.seed(123)

Expand Down
2 changes: 1 addition & 1 deletion examples/qm7/qm7_tf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import deepchem as dc
import numpy as np
from deepchem.molnet import load_qm7_from_mat
from deepchem.models.tensorgraph.optimizers import ExponentialDecay
from deepchem.models.optimizers import ExponentialDecay

np.random.seed(123)
qm7_tasks, datasets, transformers = load_qm7_from_mat(
Expand Down

0 comments on commit e0453f5

Please sign in to comment.