module training.orttraining

Short summary

module onnxcustom.training.orttraining

Helper for onnxruntime-training.

source on GitHub

Functions

function

truncated documentation

_unique_name

Returns a name different from any name in existing_names.

add_loss_output

Modifies an ONNX graph to add operators to score and allow training.

get_train_initializer

Returns the list of initializer to train.

Documentation

Helper for onnxruntime-training.

source on GitHub

onnxcustom.training.orttraining._unique_name(existing_names, name, add=True)

Returns a name different from any name in existing_names.

Parameters
  • existing_names – set of names

  • name – current

  • add – add the name of the list of existing names

Returns

unique name

source on GitHub

onnxcustom.training.orttraining.add_loss_output(onx, score_name='squared_error', loss_name='loss', label_name='label')

Modifies an ONNX graph to add operators to score and allow training.

Parameters
  • onx – onx graph

  • score_name – name of the score

  • loss_name – name of the output loss

  • label_name – name of the label input

Returns

modified graph

Possible values for score_name:

  • ‘squared_error’: \sum_i{(f(x_i)-y_i)^2}

See example Train a scikit-learn neural network with onnxruntime-training on GPU.

source on GitHub

onnxcustom.training.orttraining.get_train_initializer(onx)

Returns the list of initializer to train.

Returns

dictionary {name: (value, tensor)}

source on GitHub