chainer / chainer-chemistry

Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry
MIT License
622 stars 129 forks source link

scaler forward, __call__ support #347

Closed corochann closed 5 years ago

corochann commented 5 years ago

This PR supports to use __call__ method for scalers.

x_scaled = scaler(x)


 - Also, chainer.Sequential uses `__call__` method, so we can use Sequential as follows,

from chainer import Sequential model_with_scaler = Sequential(scaler, model)

codecov-io commented 5 years ago

Codecov Report

Merging #347 into master will increase coverage by 0.02%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   81.65%   81.67%   +0.02%     
==========================================
  Files         210      210              
  Lines        9647     9661      +14     
==========================================
+ Hits         7877     7891      +14     
  Misses       1770     1770