Skip to content

Commit 341c302

Browse files
committed
rename
1 parent b1f5087 commit 341c302

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

thesis_scripts/tSNE_plots.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def map_index_to_rgb_color(index):
2929
return map_index_to_rgb_color
3030

3131

32-
def plot_logits(subject, data_path, model_path, test_labels, dataset='test'):
32+
def plot_features(subject, data_path, model_path, test_labels, dataset='test'):
3333
with open(model_path + '/' + subject + '.pickle', 'rb') as f:
3434
state_dict = cPickle.load(f)
3535
cnn = ConvNet(state_dict['params'])
@@ -50,10 +50,10 @@ def plot_logits(subject, data_path, model_path, test_labels, dataset='test'):
5050
else scale_across_features(x, x_test=None, scalers=scalers)
5151

5252
cnn.batch_size.set_value(x.shape[0])
53-
get_logits = theano.function([cnn.x, Param(cnn.training_mode, default=0)], cnn.feature_extractor.output,
53+
get_features = theano.function([cnn.x, Param(cnn.training_mode, default=0)], cnn.feature_extractor.output,
5454
allow_input_downcast=True)
5555

56-
logits_test = get_logits(x)
56+
logits_test = get_features(x)
5757
model = TSNE(n_components=2, random_state=0)
5858
z = model.fit_transform(np.float64(logits_test))
5959
plt.scatter(z[:, 0], z[:, 1], s=60, c=y)
@@ -191,5 +191,5 @@ def plot_sequences(subject, data_path, test_labels):
191191
for subject in subjects:
192192
print '***********************', subject, '***************************'
193193
plot_train_test(subject, data_path)
194-
plot_logits(subject, data_path, model_path, labels_df[subject], dataset='train')
194+
plot_features(subject, data_path, model_path, labels_df[subject], dataset='train')
195195
plot_sequences(subject, data_path, labels_df[subject])

0 commit comments

Comments
 (0)