<jupyter_start><jupyter_text>All Experiments Analysis of transferability per Depthwise Separable Convolutional block on MobileNet v1.* __base B__ - MobileNet with 3 classes trained from scratch on self-driving data.* __sellfer BnB__ - MobileNet with n blocks transferred and frozen from _base B_ network. All the remaining blocks are initialized randomly and trained for task B.* __transfer AnB__ - MobileNet with n blocks transferred and frozen from a model trained on ImageNet (task A), all the remanining blocks are random initialized and trained for task B.* __transfer AnB+__ - similar to _transfer AnB_, but the n transferred blocks are also trained for task B.<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
data = pd.read_csv('all_experiments.csv')
data.head()
lst_models = list(data.network.unique())
xrange = np.arange(0, 14)
markersize = 8
linestyle = '-'
edge = 'black'
plt.clf()
plt.figure(figsize=(10,5))
plt.plot(data[data.network=='baseB']['block'], data[data.network=='baseB']['test_accuracy'], 
         marker='o', 
         color='white', 
         markeredgecolor=edge, 
         markersize=markersize, 
         linestyle=linestyle)
plt.plot(data[data.network=='baseB+']['block'], data[data.network=='baseB+']['test_accuracy'],
         marker='o', 
         color='red', 
         markeredgecolor=edge, 
         markersize=markersize, 
         linestyle=linestyle)
plt.plot(data[data.network=='BnB']['block'], data[data.network=='BnB']['test_accuracy'], 
         marker='^', 
         color='green', 
         markeredgecolor=edge, 
         markersize=markersize, 
         linestyle=linestyle)
plt.plot(data[data.network=='AnB']['block'], data[data.network=='AnB']['test_accuracy'], 
         marker='s', 
         color='blue', 
         markeredgecolor=edge, 
         markersize=markersize, 
         linestyle=linestyle)
plt.plot(data[data.network=='AnB+']['block'], data[data.network=='AnB+']['test_accuracy'], 
         marker='D', 
         color='orange', 
         markeredgecolor=edge, 
         markersize=markersize, 
         linestyle=linestyle)
plt.title('Transferability analysis per block') 
plt.xlabel('Block n at which network is chopped and retrained') 
plt.ylabel('Test accuracy') 
plt.xticks(xrange)
plt.legend(list(data.network.unique()), loc='best') 
plt.rcParams.update({'font.size': 11})
plt.savefig('transfer_analysis.png')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13273615635179153, 'fraction_numerical': 0.004478827361563518, 'mean_word_length': 3.9939024390243905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '628419', 'license': 'MIT', 'n_tokens_mistral': 794, 'n_tokens_neox': 731, 'n_words': 179, 'path': 'transfer/plots/Experiments.ipynb', 'repo_name': 'paulaksm/feature-transfer', 'size': '2456'}