摘要:
import tensorflow as tf def model_1(): with tf.variable_scope("var_a"): a = tf.Variable(initial_value=[1, 2, 3], name="a") vars = [var for var in tf.trainable_variables() if var... 阅读全文
摘要:
import tensorflow as tf import numpy as np import skimage from skimage import data, io, color from PIL import Image path = "1.tfrecords" img_path = '/data/test/img/1.png' with tf.python_io.TFRe... 阅读全文
摘要:
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ 阅读全文
摘要:
n数求和,固定n-2个数,最后两个数在连续区间内一左一右根据当前求和与目标值比较移动,如果sum<target,移动较小数,否则,移动较大数 重复数处理: 使i为左至右第一个不重复数:while(i != 0 && i<n-2 && a[i] == a[i-1]) i++; 使r为右至左第一个不重复 阅读全文
摘要:
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
摘要:
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
摘要:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
摘要:
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl 阅读全文
摘要:
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two one's 阅读全文