摘要: #前者为Variable的案例 #后者为Session import tensorflow as tf tf.compat.v1.disable_eager_execution() state = tf.Variable(0, name='counter') # 定义常量 one one = tf. 阅读全文
posted @ 2022-07-18 21:20 是冰美式诶 阅读(45) 评论(0) 推荐(0)
摘要: import tensorflow as tf import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior()# 由于部分代码含有版本不同,此将v2版本禁用使用v1版本 # create data x_dat 阅读全文
posted @ 2022-07-18 21:18 是冰美式诶 阅读(148) 评论(0) 推荐(0)
摘要: #一个判断函数,一个填数函数 #开始本来想就36进行改,但其参数有限,重新判断(其中将分为9个大块) class Solution: def solveSudoku(self, board: List[List[str]]) -> None: """ Do not return anything, 阅读全文
posted @ 2022-07-18 16:29 是冰美式诶 阅读(31) 评论(0) 推荐(0)
摘要: #暴力破解 # 数字 1-9 在每一行只能出现一次。 # 数字 1-9 在每一列只能出现一次。 # 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次 class Solution: def isValidSudoku(self, board: List[List[str]]) -> b 阅读全文
posted @ 2022-07-18 15:50 是冰美式诶 阅读(42) 评论(0) 推荐(0)