Fix IPEX support and add XPU device to device_utils

This commit is contained in:
Disty0
2024-01-31 17:32:37 +03:00
parent 2ca4d0c831
commit a6a2b5a867
27 changed files with 248 additions and 245 deletions

View File

@@ -11,12 +11,13 @@ from typing import Dict, List
import numpy as np
import torch
from library.device_utils import init_ipex, get_preferred_device
init_ipex()
from torch import nn
from tqdm import tqdm
from PIL import Image
from library.device_utils import get_preferred_device
class ResidualBlock(nn.Module):
def __init__(self, in_channels, out_channels=None, kernel_size=3, stride=1, padding=1):