Chainer Chemistry
latest

Contents

  • Installation
  • Tutorial
  • Contribution guide
  • Development policy
  • API Reference
Chainer Chemistry
  • Docs »
  • chainer_chemistry.links.EmbedAtomID
  • Edit on GitHub

chainer_chemistry.links.EmbedAtomID¶

class chainer_chemistry.links.EmbedAtomID(out_size, in_size=117, initialW=None, ignore_label=None)[source]¶

Embeddning specialized to atoms.

This is a chain in the sense of Chainer that converts an atom, represented by a sequence of molecule IDs, to a sequence of embedding vectors of molecules. The operation is done in a minibatch manner, as most chains do.

The forward propagation of link consists of ID embedding, which converts the input x into vector embedding h where its shape represents (minibatch, atom, channel)

See also

chainer.links.EmbedID

__init__(out_size, in_size=117, initialW=None, ignore_label=None)[source]¶

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(out_size[, in_size, initialW, …]) Initialize self.
add_hook(hook[, name]) Registers a link hook.
add_param(name[, shape, dtype, initializer]) Registers a parameter to the link.
add_persistent(name, value) Registers a persistent value to the link.
addgrads(link) Accumulates gradient values from given link.
children() Returns a generator of all child links.
cleargrads() Clears all gradient arrays.
copy([mode]) Copies the link hierarchy to new one.
copyparams(link[, copy_persistent]) Copies all parameters from given link.
count_params() Counts the total number of parameters.
delete_hook(name) Unregisters the link hook.
disable_update() Disables update rules of all parameters under the link hierarchy.
enable_update() Enables update rules of all parameters under the link hierarchy.
forward(x) Extracts the word embedding of given IDs.
init_scope() Creates an initialization scope.
links([skipself]) Returns a generator of all links under the hierarchy.
namedlinks([skipself]) Returns a generator of all (path, link) pairs under the hierarchy.
namedparams([include_uninit]) Returns a generator of all (path, param) pairs under the hierarchy.
params([include_uninit]) Returns a generator of all parameters under the link hierarchy.
register_persistent(name) Registers an attribute of a given name as a persistent value.
repeat(n_repeat[, mode]) Repeats this link multiple times to make a Sequential.
serialize(serializer) Serializes the link object.
to_cpu() Copies parameter variables and persistent values to CPU.
to_gpu([device]) Copies parameter variables and persistent values to GPU.
to_intel64() Copies parameter variables and persistent values to CPU.
zerograds() Initializes all gradient arrays by zero.

Attributes

ignore_label
local_link_hooks Ordered dictionary of registered link hooks.
update_enabled True if at least one parameter has an update rule enabled.
within_init_scope True if the current code is inside of an initialization scope.
xp Array module for this link.

© Copyright 2017, Preferred Networks, Inc. Revision d1c6859a.

Built with Sphinx using a theme provided by Read the Docs.