sinusoid activation extrapolates perfectly:
class fede_net(nn.Module):
	def __init__(self, leaky_slope = 0.1):
		super(fede_net, self).__init__()
	
		self.h1 = nn.Linear(1,2)
		self.h2 = nn.Linear(2,2)
		
	def forward(self, x):
		x = self.h1(x)
		x = torch.sin(x)
		x = self.h2(x)
		return x

train_dl = DataLoader(train_ds, 64)
optimizer = SGD(net.parameters(), 0.1)
scheduler = ExponentialLR(optimizer, 0.9)

but this is just an extrapolation exploiting geometry knowledge, you can’t build a [memorizing] approximating function for a region without training points