Skip to content

Instantly share code, notes, and snippets.

View p3nGu1nZz's full-sized avatar
🌎
w o r k i n g • f r o m • s p a c e

p3ngu1nZz p3nGu1nZz

🌎
w o r k i n g • f r o m • s p a c e
  • N. America
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Multiple Wobbly Plasma Bubbles</title>
</head>
<body>
@p3nGu1nZz
p3nGu1nZz / .py
Created December 2, 2024 14:14
EWC for fine-tuning models.
import torch
import torch.nn as nn
import torch.optim as optim
# Example model
class SimpleNN(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(SimpleNN, self).__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.fc2 = nn.Linear(hidden_size, output_size)