想要知道在python def plot_images(images, labels, class_names):语句中python起什么作用以及怎样正确使用

问题遇到的现象和发生背景

使用convolution-network-natural-scenes项目代码实现Imagnette数据集的图片分类。

Imagnette是从大型数据集ImageNet(超过1400万张图片, 20,000个类别)中抽取出来的一个小数据集,由于早期研究人员和学生的计算资源有限,但他们也想在ImageNet这样的数据集上做研究和练习,因此才有了imagnette这个袖珍版的数据集。

imagenette的训练集有9469张图片,测试集有3925张图片,格式都为JPEG,图片分辨率不统一,但宽高都不小于160个像素。

问题相关代码,请勿粘贴截图

问题相关代码:
import numpy as np
import matplotlib.pyplot as plt

python
def plot_images(images, labels, class_names):
fig, axes = plt.subplots(3, 5, figsize=(12, 6))

这里plot_images函数抬头为:

def plot_images(images, labels, class_names):
运行结果及报错内容

1:name 'python' is not defined

2:2022-04-29 14:01:38.783991: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
OMP: Error #15: Initializing libiomp5, but found libiomp5md.dll already initialized.

我的解答思路和尝试过的方法

删除python或者定义python,都会引起第2项错误。

我想要达到的结果

知道在这里python的作用,跑通程序。

第一按照代码规范,那个python是必须要去掉的
第二卸载干净,试着重新安装一下tensortflow,对应好python版本