----- MODEL "cython-linesentence-word2vec-window-05-workers-01-size-300" RESULTS -----
* Vocab time: 126.159779072 sec.
* Total epoch time: 1181.82512498 sec.
* Processing speed: 144372.118509 words/sec
* Avg CPU loads: 0.14, 0.35, 5.27, 94.53, 0.09, 0.23, 0.01, 0.02, 0.02, 0.02, 0.02, 0.01, 0.02, 0.02, 0.33, 0.02
* Sum CPU load: 101.11282
----- MODEL "cython-linesentence-word2vec-window-05-workers-04-size-300" RESULTS -----
* Vocab time: 126.206352949 sec.
* Total epoch time: 305.442888975 sec.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.autograd | |
class MaskedSpMatmul(torch.autograd.Function): | |
CHUNK_SIZE = 10000 | |
@staticmethod | |
def forward(ctx, a, b, mask): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2010 Radim Rehurek <[email protected]> | |
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html | |
"""Corpus in the Matrix Market format. | |
This code uses python's struct library to read/write binary data |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optionally, you could now dump the network weights to a file like this: | |
np.savez('model.npz', *lasagne.layers.get_all_param_values(network)) | |
# | |
# And load them again later on like this: | |
with np.load('model.npz') as f: | |
param_values = [f['arr_%d' % i] for i in range(len(f.files))] | |
lasagne.layers.set_all_param_values(network, param_values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gym | |
import numpy as np | |
DISCOUNT = 1.0 | |
STEP_REWARD = 0.0 | |
LOSE_REWARD = 0.0 | |
WIN_REWARD = 1.0 | |
def avg_reward(env, s, a): | |
avg_reward = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.feature_extraction.text import CountVectorizer | |
import logging | |
class BagOfWordsModel(object): | |
OUT_FOLDER = 'out' | |
def __init__(self, id_document_dict, max_features=None, max_df=1.0): | |
"""Builds bow model. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Want to move computation on machine with much power. We will set up Anaconda 4.0.0 and XGBoost 0.4 (it is tricky installable).
- Amazon AWS Educate gives 100$ for MIPT students.
- GitHub Students Pack additionaly gives 15$.
NewerOlder