赞
踩
有解释器:
设置环境:
var1 = 1 # 整型 var2 = 1.1 # 浮点型 var3 = 1 + 2j # 复数 var4 = 'hello' # 字符串 var5 = True # 布尔型 var6 = [1, 2, 3] # 列表List var7 = (1, 2, 3) # 元组Tuple var8 = {1, 2, 3} # 集合Set var9 = {'name': 'Tom', 'age': 18} # 字典Dict # use print(var9['name']) # 嵌套 var9 = {'name': 'Tom', 'age': [1, 2, 3]} # 字典Dict print(var9) def print_hi(name): print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. return "nihao" def sum_num(a, b): return a + b print(print_hi('PyCharm')) print(sum_num(1, 2)) class Person: def __init__(self, name, age): self.name = name self.age = age def print_info(self): print(f'Name: {self.name}, Age: {self.age}') xiaoming = Person('小明', 18) xiaoming.print_info()
安装:
pip3 install torch torchvision
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。