hdcnn package

Submodules

hdcnn.utils module

hdcnn.utils.test(inputs, model, model_name)

predict the test labels

Parameters
  • inputs – X_test

  • model – model to the trained

  • model_name – the name of the model

Returns

hdcnn.utils.train(model, train_loader, test_loader, optimizer, criterion, scheduler, writer, device, num_epochs, fine_idxs=None, model_name='model_fine.pkl')

train the hd-cnn network (slightly different from standard trainng function)

Parameters
  • model – trivial

  • train_loader – trivial

  • test_loader – trivial

  • optimizer – trivial

  • criterion – trivial

  • scheduler – trivial

  • writer – SummaryWriter in tensorboardX

  • device – trivial

  • num_epochs – trivial

  • fine_idxs – Fine indices corresponding to a specific coarse labels

  • model_name – name of the model

Returns

Module contents