from chainer import function
from chainer import function_set
from chainer.functions import basic_math
from chainer import optimizer
from chainer import variable

Variable = variable.Variable
Function = function.Function
FunctionSet = function_set.FunctionSet
Optimizer = optimizer.Optimizer

basic_math.install_variable_arithmetics()

import pkg_resources

from chainer import function
from chainer import function_set
from chainer.functions import basic_math
from chainer import optimizer
from chainer import variable


__version__ = pkg_resources.get_distribution('chainer').version

Variable = variable.Variable
Function = function.Function
FunctionSet = function_set.FunctionSet
Optimizer = optimizer.Optimizer

basic_math.install_variable_arithmetics()

Add version number to chainer module
Add version number to chainer module

+ import pkg_resources
+ 
  from chainer import function
  from chainer import function_set
  from chainer.functions import basic_math
  from chainer import optimizer
  from chainer import variable
+ 
+ 
+ __version__ = pkg_resources.get_distribution('chainer').version
  
  Variable = variable.Variable
  Function = function.Function
  FunctionSet = function_set.FunctionSet
  Optimizer = optimizer.Optimizer
  
  basic_math.install_variable_arithmetics()
  
Add version number to chainer module
## Code Before:
from chainer import function
from chainer import function_set
from chainer.functions import basic_math
from chainer import optimizer
from chainer import variable

Variable = variable.Variable
Function = function.Function
FunctionSet = function_set.FunctionSet
Optimizer = optimizer.Optimizer

basic_math.install_variable_arithmetics()

## Instruction:
Add version number to chainer module
## Code After:
import pkg_resources

from chainer import function
from chainer import function_set
from chainer.functions import basic_math
from chainer import optimizer
from chainer import variable


__version__ = pkg_resources.get_distribution('chainer').version

Variable = variable.Variable
Function = function.Function
FunctionSet = function_set.FunctionSet
Optimizer = optimizer.Optimizer

basic_math.install_variable_arithmetics()
