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
#include <stdio.h> | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif | |
int main() { |
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 numpy as np | |
import tensorflow as tf | |
import sys | |
from tensorflow.examples.tutorials.mnist import input_data | |
n_pseudo_batches = int(sys.argv[1]) if len(sys.argv) > 1 else 128 | |
actual_batch_size = int(sys.argv[2]) if len(sys.argv) > 2 else 32 | |
iterations = int(sys.argv[3]) if len(sys.argv) > 3 else 10 |
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
#!/bin/bash | |
### steps #### | |
# Verify the system has a cuda-capable gpu | |
# Download and install the nvidia cuda toolkit and cudnn | |
# Setup environmental variables | |
# Verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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
import os | |
import tensorflow as tf | |
trained_checkpoint_prefix = 'checkpoints/dev' | |
export_dir = os.path.join('models', '0') # IMPORTANT: each model folder must be named '0', '1', ... Otherwise it will fail! | |
loaded_graph = tf.Graph() | |
with tf.Session(graph=loaded_graph) as sess: | |
# Restore from checkpoint | |
loader = tf.train.import_meta_graph(trained_checkpoint_prefix + '.meta') |
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 tensorflow as tf | |
from open_seq2seq.utils.utils import get_base_config, check_logdir, create_model | |
# Change with your configs here | |
args_S2T = ["--config_file=/data/training/v5/config-J5x3.py", | |
"--mode=interactive_infer", | |
"--logdir=/data/training/v5/models", | |
"--batch_size_per_gpu=10", | |
] |
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 tensorflow as tf | |
# FIXME: audio_ops.decode_wav is deprecated, use tensorflow_io.IOTensor.from_audio | |
from tensorflow.contrib.framework.python.ops import audio_ops | |
# Enable eager execution for a more interactive frontend. | |
# If using the default graph mode, you'll probably need to run in a session. | |
tf.enable_eager_execution() | |
@tf.function | |
def audio_to_mfccs( |
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 requests | |
import math | |
import pandas as pd | |
import flatten_json | |
# instalar flatten_json con: pip install flatten_json | |
# Referencia: https://github.com/amirziai/flatten | |
# parámetros | |
url_api_productos_contar = "https://api.jumpseller.com/v1/products/count.json" |
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 math | |
from typing import Callable, Optional | |
from warnings import warn | |
import torch | |
from torch import Tensor | |
from torchaudio import functional as F | |
from torchaudio.compliance import kaldi | |
OlderNewer