Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import torch | |
| import torchvision | |
| import datasets | |
| import diffusers | |
| import accelerate | |
| from tqdm.auto import tqdm | |
| import matplotlib.pyplot as plt | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Memory-Efficient Wan Text-to-Video Model - Single File Implementation | |
| Generates synthetic data, trains on it, and demonstrates inference | |
| Optimized for Google Colab with minimal GPU memory usage | |
| """ | |
| import math | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| from torch.utils.data import Dataset, DataLoader | |
| from torch.cuda.amp import autocast, GradScaler | |
| import math | |
| import random | |
| import numpy as np | |
| from datasets import load_dataset | |
| from tqdm import tqdm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| class SimpleNeuralNetwork: | |
| def __init__(self, input_size, hidden_size, output_size, learning_rate=0.1): | |
| # Initialize weights and biases for 2-layer network | |
| self.W1 = np.random.randn(input_size, hidden_size) * np.sqrt(2.0 / input_size) | |
| self.b1 = np.zeros((1, hidden_size)) # Hidden layer bias | |
| self.W2 = np.random.randn(hidden_size, output_size) * np.sqrt(2.0 / hidden_size) | |
| self.b2 = np.zeros((1, output_size)) # Output layer bias |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import React, { useState } from 'react'; | |
| import { Card, CardContent } from "@/components/ui/card"; | |
| import { Button } from "@/components/ui/button"; | |
| import { ChevronLeft, ChevronRight, Minus, Plane, Plus } from 'lucide-react'; | |
| const product = { | |
| id: '1', | |
| name: 'Strawberries', |