Okay need this error fixed 2024-09-14 20:34:46.154150: I…
Private research annotation
Sign in to add a private research label or note.
- User
Okay need this error fixed 2024-09-14 20:34:46.154150: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable
TF_ENABLE_ONEDNN_OPTS=0. 2024-09-14 20:34:46.796405: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variableTF_ENABLE_ONEDNN_OPTS=0. WARNING:tensorflow:From C:\Users\Picky\AppData\Local\Programs\Python\Python310\lib\site-packages\tf2onnx\tf_loader.py:68: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.WARNING:tensorflow:From C:\Users\Picky\AppData\Local\Programs\Python\Python310\lib\site-packages\tf2onnx\tf_loader.py:72: The name tf.train.import_meta_graph is deprecated. Please use tf.compat.v1.train.import_meta_graph instead.
pygame 2.6.0 (SDL 2.28.4, Python 3.10.11) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "D:\coin\ccc\Xseg2onnx\start.py", line 373, in if name == "main": NameError: name 'name' is not defined here is the code that needs fixing import tkinter as tk from tkinter import filedialog, messagebox, ttk import os import sys import re import threading
Ensure UTF-8 support
if sys.version_info < (3,): import codecs sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer if hasattr(sys.stdout, 'buffer') else sys.stdout) else: sys.stdin.reconfigure(encoding='utf-8') sys.stdout.reconfigure(encoding='utf-8')
import numpy as np import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.layers import ( Input, Conv2D, Conv2DTranspose, Activation, Concatenate, BatchNormalization, MaxPooling2D, UpSampling2D ) import tf2onnx
Import pygame for music playback
import pygame
def conv_block(input_tensor, num_filters, kernel_size=3, padding='same', strides=1): """ Convolutional block consisting of Conv2D + BatchNormalization + ReLU Activation. """ x = Conv2D(num_filters, kernel_size=kernel_size, strides=strides, padding=padding)(input_tensor) x = BatchNormalization()(x) x = Activation('relu')(x) return x
def deconv_block(input_tensor, num_filters, kernel_size=3, padding='same', strides=2): """ Deconvolutional block consisting of Conv2DTranspose + BatchNormalization + ReLU Activation. """ x = Conv2DTranspose(num_filters, kernel_size=kernel_size, strides=strides, padding=padding)(input_tensor) x = BatchNormalization()(x) x = Activation('relu')(x) return x
def build_xseg_model(input_resolution): """ Build the XSeg model architecture matching the DeepFaceLab implementation for a given input resolution. The model is a U-Net-like architecture with encoder and decoder.
- Assistant
The error you're encountering:
plaintextTraceback (most recent call last): File "D:\coin\ccc\Xseg2onnx\start.py", line 373, in <module> if name == "main": NameError: name 'name' is not definedis due to a small typo in your code. In Python, to check if the script is being run directly (not imported as a module), you should use:
pythonif __name__ == "__main__": main()However, your code has:
python