Python
noedn
累了,今天就作为博客关闭的日子吧
展开
-
Python—tf.summary.scalar()用法
简单应用代码:import tensorflow.compat.v1 as tftf.compat.v1.disable_eager_execution()#由于当前环境使用的是tensorflow 2,使用兼容版本1‘compat v1’之后使用placeholder会不兼容#tf.placeholder() is not compatible with eager execution.#所以添加disable_eager_execution#https://blog.csdn.net/wei原创 2020-10-18 09:26:59 · 2291 阅读 · 1 评论 -
Python当中的全局变量与局部变量在类当中的使用
代码:#!/usr/bin/python# -*- coding: utf-8 -*-name = "whole global name"class Person: name = "class global name" def __init__(self, newPersionName): #self.name = newPersionName; #此处,没有使用self.name #而使得此处的name,实际上仍是局部变量nam转载 2020-10-17 20:51:59 · 520 阅读 · 1 评论