py模型数据集板子
作者:
moon_star
,
2024-06-09 16:56:30
,
所有人可见
,
阅读 46
import torch
import cv2
import cv2 as cv
import numpy as np
import torchvision
import torchvision as tv
from torch import nn
from torch.nn import Conv2d
from torch.utils.data import DataLoader
from typing import NewType
fl = NewType('fl', float)
N=3e6+10
mod=1e9+7
def ls( p) :return p<<1
def rs( p): return p<<1|1
def lowbit(x):return x & -x
def eps(callback, a, b):
for i in range(a, b + 1):
callback(i)
data = torchvision.datasets.CIFAR10("C:\python\project\pytorch\dataset", train=False, download=True,
transform=torchvision.transforms.ToTensor())
dataloader = DataLoader(data, batch_size=64)
class moon(nn.Module):
def __init__(self):
super(moon, self).__init__()
def forward(self, input):
output=1
return output
for x in dataloader:
print(1)