FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add chainer-chemistry by corochann · Pull Request #447 · Kaggle/docker-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) No extension  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions Dockerfile
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
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ RUN pip install flashtext && \
pip install pykalman && \
pip install optuna && \
pip install chainercv && \
pip install chainer-chemistry && \
pip install plotly_express && \
pip install albumentations && \
/tmp/clean-layer.sh
Expand Down
19 changes: 19 additions & 0 deletions tests/test_chainer_chemistry.py
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import numpy
import unittest

from chainer import cuda

from chainer_chemistry.models.mlp import MLP


class TestChainerChemistry(unittest.TestCase):

def test_mlp(self):
batch_size = 2
input_dim = 16
out_dim = 4

model = MLP(out_dim=out_dim)
data = numpy.random.rand(batch_size, input_dim).astype(numpy.float32)
y_actual = cuda.to_cpu(model(data).data)
assert y_actual.shape == (batch_size, out_dim)

Back | FazBrowse Home | New Git URL