摘要:
import tensorflow as tf #模拟一下同步先处理数据,然后才能取数据训练 #tensorflow当中,运行操作有依赖性 #1.首先定义队列 Q = tf.FIFOQueue(3,tf.float32) #放入一些数据 enq_many = Q.enqueue_many([[0.1 阅读全文
摘要:
https://www.bilibili.com/video/BV1g7411k7MD?from=search&seid=13649975876676293013 import asyncio import random #需求:有一个crontab调度器,每隔1秒,拉起1个job,要求这些job可 阅读全文
摘要:
import asyncio #携程(携程不是函数) async def print_hello(): while True: print("hello world") await asyncio.sleep(1) #暂停1s async def print_goodbye(): while Tru 阅读全文
摘要:
import face_recognition #人脸识别库 pip cmake dlib import cv2 #读取图像 face_image1 = face_recognition.load_image_file("1.jpg") face_image2 = face_recognition. 阅读全文
摘要:
import subprocess #方法一:进入某个环境执行语句(adb shell),注意shell内部命令需要带\n,执行完后一定记得执行exit命令退出,否则会阻塞 obj = subprocess.Popen(['adb', 'shell'], shell = True, stdin=su 阅读全文
摘要:
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt BATCH_START = 0 TIME_STEPS = 20 BATCH_SIZE = 20 INPUT_SIZE = 1 OUTPUT_SIZE 阅读全文
摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data #this is data mnist = input_data.read_data_sets("MNIST_data",one_ho 阅读全文
摘要:
import tensorflow as tf import numpy as np # ##Save to file # W = tf.Variable([[4,5,6],[7,8,9]],dtype=tf.float32,name="weight") # b = tf.Variable([[2, 阅读全文
摘要:
""" Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly. """ import tensorflow as tf from skl 阅读全文
摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import os os.environ["CUDA_DEVICE_ORDER"] = "0,1" mnist = input_dat 阅读全文