qml.templates.utils.check_number_of_layers

check_number_of_layers(list_of_weights)[source]

Check that all sequences in list_of_weights have the same first dimension.

Parameters

list_of_weights (list) – list of all weights to the template

Returns

number of layers

Return type

int

Raises

ValueError