Spaces:
Runtime error
Runtime error
File size: 270 Bytes
4ea50ff |
1 2 3 4 5 6 7 8 9 10 11 12 |
import torch
from torch import nn
class Scale(nn.Module):
def __init__(self, init_value=1.0):
super(Scale, self).__init__()
self.scale = nn.Parameter(torch.FloatTensor([init_value]))
def forward(self, input):
return input * self.scale
|