2019年1月1日
摘要: 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... 阅读全文
posted @ 2019-01-01 10:33 平和之心 阅读(1896) 评论(0) 推荐(0) 编辑
2018年10月18日
摘要: 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... 阅读全文
posted @ 2018-10-18 20:34 平和之心 阅读(539) 评论(0) 推荐(0) 编辑
2018年8月5日
摘要: 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: [ 阅读全文
posted @ 2018-08-05 20:02 平和之心 阅读(118) 评论(0) 推荐(0) 编辑
2018年7月31日
摘要: n数求和,固定n-2个数,最后两个数在连续区间内一左一右根据当前求和与目标值比较移动,如果sum<target,移动较小数,否则,移动较大数 重复数处理: 使i为左至右第一个不重复数:while(i != 0 && i<n-2 && a[i] == a[i-1]) i++; 使r为右至左第一个不重复 阅读全文
posted @ 2018-07-31 21:14 平和之心 阅读(127) 评论(0) 推荐(0) 编辑
2018年7月30日
摘要: 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 阅读全文
posted @ 2018-07-30 21:16 平和之心 阅读(146) 评论(0) 推荐(0) 编辑
2018年7月22日
摘要: 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 阅读全文
posted @ 2018-07-22 20:13 平和之心 阅读(124) 评论(0) 推荐(0) 编辑
2018年7月19日
摘要: 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: 阅读全文
posted @ 2018-07-19 22:31 平和之心 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
posted @ 2018-07-19 21:52 平和之心 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-07-19 21:34 平和之心 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-07-19 21:13 平和之心 阅读(148) 评论(0) 推荐(0) 编辑