Skip to content

v6.2.0: Improve API and introduce overloaded operators

Compare
Choose a tag to compare
@honnibal honnibal released this 15 Jan 02:32

✨ Major features and improvements

  • NEW: Model now has define_operators() classmethod to overload operators for a given block.
  • Add chain(), clone() and concatenate() functions for use with overloaded operators.
  • Add describe module which provides class decorators for defining new layers.
  • Allow layers to calculate input and output sizes based on training data.

Together, these features allow very concise model definitions:

with Model.define_operators({'**': clone, '>>': chain}):
    model = BatchNorm(ReLu(width)) ** depth >> Softmax()

⚠️ Backwards incompatibilities

  • Major revisions to previously undocumented neural network APIs (see above).

📋 Tests

  • Reorganise and improve tests for neural network functions.
  • Reach 100% coverage over the current neural network classes.