Text Generation
PEFT
Safetensors
lora
reinforcement-learning
code
hip
rocm
gpu-kernels
File size: 474 Bytes
35564ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import torch
import torch.nn as nn


class Model(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x, target):
        x = torch.eq(x, target)
        criterion = nn.MSELoss()
        return criterion(x, target)


batch_size = 256
height = 512
width = 1024


def get_inputs():
    x = torch.randn(batch_size, height, width)
    target = torch.randn(batch_size, height, width)
    return [x, target]


def get_init_inputs():
    return []