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 hidden or 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 numpy as np | |
| import time | |
| elapsed = 0 | |
| for _ in range(10): | |
| a1 = np.random.random((8192, 8192)).astype(np.float32) |
This file contains hidden or 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
| xgb_params = { | |
| "booster": "gbtree", | |
| "objective": "binary:logistic", | |
| "eta": 0.1, | |
| "gamma": 0, | |
| "min_child_weight": 200, | |
| "max_depth": 6, | |
| "eval_train": 1, | |
| "tree_method": "gpu_hist", |
This file contains hidden or 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
| #include <vector> | |
| #include <utility> | |
| #include <cstdio> | |
| std::pair<float, int> recursive_mean( | |
| const std::vector<float> &vec, | |
| const int first, | |
| const int last) { |
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.
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 hidden or 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
| FROM centos:7 | |
| RUN yum makecache | |
| RUN yum install -y centos-release-SCL which yum-utils centos-release-scl-rh epel-release | |
| RUN yum install -y python27 \ | |
| python27-python-devel \ | |
| python27-python-wheel \ | |
| java-1.8.0-openjdk-devel \ | |
| devtoolset-8-toolchain \ | |
| devtoolset-6-toolchain \ |
This file contains hidden or 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
| package com.twitter.sample.lib | |
| import java.io.File | |
| import org.apache.commons.io.{FileUtils, IOUtils} | |
| import org.tensorflow.TensorFlow | |
| import com.twitter.logging.Logger | |
| import java.nio.file.{Files, Paths} | |
| object TfLoader { |
This file contains hidden or 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 numpy as np | |
| import tensorflow.compat.v2 as tf | |
| class Sparse(tf.keras.layers.Dense): | |
| def call(self, inputs): | |
| outputs = tf.sparse.sparse_dense_matmul(inputs, self.kernel) | |
| if self.use_bias: | |
| outputs = tf.nn.bias_add(outputs, self.bias) | |
| return outputs |
NewerOlder