src.tests.freeze_training_test

Classes

FreezeTrainingTest()

class src.tests.freeze_training_test.FreezeTrainingTest
Author:

Alberto M. Esmoris Pena

Freeze training test that checks freeze training specifications are correctly handled.

__init__()

Basic configuration for any VL3D test.

Parameters:

name (str) – Test name

run()

Run freeze training test.

Returns:

True if the freeze training specification are handled as expected, False otherwise.

Return type:

bool

check_test_case1()

Check that freeze training works as expected for a test case.

Returns:

True if the test case is passed, False otherwise.

Return type:

bool

check_test_case2()

See FreezeTrainingTest.check_test_case1().

check_test_case3()

See FreezeTrainingTest.check_test_case1().

check_test_case4()

See FreezeTrainingTest.check_test_case1().

check_test_case5()

See FreezeTrainingTest.check_test_case1().

check_test_case6()

See FreezeTrainingTest.check_test_case1().

check_test_case7()

See FreezeTrainingTest.check_test_case1().

static build_mock_model_handler(training_epochs)

Build a mock model handler to test the freeze training preparation logic.

Returns:

A named tuple providing a mock model handler with the attributes needed by the freeze training preparation method, i.e., the number of epochs.

Return type:

namedtuple

static validate(epochs, ops, lrs, expected_epochs, expected_ops, expected_lrs)

Validate that the given results match the expected ones.

Parameters:
  • epochs – Extracted epochs for freeze training.

  • ops – Extracted operations for freeze training.

  • lrs – Extracted initial learning rates for freeze training.

  • expected_epochs – Expected epochs for freeze training.

  • expected_ops – Expected operations for freeze training.

  • expected_lrs – Expected learning rates for freeze training.

Returns:

True if the given results match the expected ones, False otherwise.

Return type:

bool

static validate_random(epochs, ops, lrs, expected_epochs, expected_ops, expected_lrs)

Adapted FreezeTrainingTest.validate() for the case of random strategy.