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 time | |
import torch | |
import mlx.core as mx | |
import mlx.nn as mn | |
import numpy as np | |
# 1. Generate input | |
T, B, C = 128, 64, 32 | |
t = T // 2 - 4 |
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
var mime = require('mime'), fs = require('fs'), url = require('url'), zlib = require('zlib'); | |
module.exports = function(req, res){ | |
var fn = url.parse(req.url).pathname; | |
if (fn.substr(-1) == '/') fn += 'index.html'; | |
var file = __dirname + '/static' + fn; | |
try { | |
var ct = mime.lookup(file); | |
if (ct.split('/')[0] == 'text') ct += '; charset=UTF-8'; | |
var stat = fs.statSync(file), | |
gzip = (('accept-encoding' in req.headers) && (req.headers['accept-encoding'].split(',').map(function(e){return e.trim();}).indexOf('gzip') != -1)), |