Whenever I analyzed the results of the DL experiment, I had to re-implement the analysis function every time. So, I implement frequently used functions in this repository. New features continue to be implemented, and simple examples of function usages can be found in the examples directory.
You can install the package with pip command. Python>=3 are supported.
pip install dl-toolkits
You can check the version of the package using the following commands.
import toolkits
print(toolkits.__version__)viz.tsne: t-SNE plotcluster.sse: Sum of squared error(SSE) 1cluster.batch_sse: Sum of squared error(SSE) for batch inputcluster.nsse: SSE normalized by the squared distance to the nearest interfering centroid(nSSE) 1cluster.batch_nsse: SSE normalized by the squared distance to the nearest interfering centroid(nSSE) for batch inputcluster.nearc: Top N nearest interfering centroidcluster.rfc: Feature space clustering quality(R_fc) 2linalg.get_singular_values: Get singular values per classlinalg.get_sum_of_singular_values: Get sum of singular values per classlinalg.get_average_sum_of_singular_values: Get average of sum of singular values per class 3pprint.pred_summary: Simple print for predictions and true labelsparse.between_lines: Extract the log between the two input sentencesparse.between_lines_on_file: Extract the log between the two input sentences on the target fileparse.between_lines_on_dir: Extract the log between the two input sentences on the target directorytorch_helper.freeze_selected_param: Freeze the weights with the selected nametorch_helper.get_important_param_idx: Get important parameters indices4Pedregosa, Fabian, et al. "Scikit-learn: Machine learning in Python." the Journal of machine Learning research 12 (2011): 2825-2830.
Yoon, Sung Whan, et al. "Xtarnet: Learning to extract task-adaptive representation for incremental few-shot learning." International Conference on Machine Learning. PMLR, 2020. ↩ ↩2
Goldblum, Micah, et al. "Unraveling meta-learning: Understanding feature representations for few-shot tasks." International Conference on Machine Learning. PMLR, 2020. ↩
Verma, Vikas, et al. "Manifold mixup: Better representations by interpolating hidden states." International Conference on Machine Learning. PMLR, 2019. ↩
Mazumder, Pratik, Pravendra Singh, and Piyush Rai. "Few-Shot Lifelong Learning." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 35. No. 3. 2021. ↩