Skip to content

Instantly share code, notes, and snippets.

View bearpelican's full-sized avatar

Andrew Shaw bearpelican

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Data
midi_files = get_files(midi_path, '.mid', recurse=True)
data = MusicDataBunch.from_files(midi_files, data_path, processors=[Midi2ItemProcessor()])
# Model
learn = music_model_learner(data, arch=TransformerXL, config=default_config())
# Train
learn.fit_one_cycle(4)
@bearpelican
bearpelican / Roman2Symbol_test_case.ipynb
Created February 28, 2019 23:26
Chord change after adding: `scale = [s+sec_offset for s in scale]`
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.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import torch\n",
"import torch.nn as nn\n",
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.
algo-1-X9QH2_1 | [2018-12-11 01:17:04 +0000] [60] [ERROR] Socket error processing request.
algo-1-X9QH2_1 | Traceback (most recent call last):
algo-1-X9QH2_1 | File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base_async.py", line 66, in handle
algo-1-X9QH2_1 | six.reraise(*sys.exc_info())
algo-1-X9QH2_1 | File "/usr/local/lib/python3.7/dist-packages/gunicorn/six.py", line 625, in reraise
algo-1-X9QH2_1 | raise value
algo-1-X9QH2_1 | File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base_async.py", line 56, in handle
algo-1-X9QH2_1 | self.handle_request(listener_name, req, client, addr)
algo-1-X9QH2_1 | File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/ggevent.py", line 160, in handle_request
algo-1-X9QH2_1 | addr)
Distributed initializing process group
Loading model
Loading distributed
Forward
Backward
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-1-a0b9fdb95505> in <module>()
33 print('Backward')
34 loss = out.sum()
import os
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torch.utils.data
import torch.utils.data.distributed
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel
cudnn.benchmark = True