Skip to content

Instantly share code, notes, and snippets.

View tocom242242's full-sized avatar

tocom242242

View GitHub Profile
@tocom242242
tocom242242 / python
Created January 8, 2024 11:45
active_test
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn.model_selection import train_test_split
# Set the seed for reproducibility
np.random.seed(0)
@tocom242242
tocom242242 / siamsiam_cifar10.ipynb
Created December 21, 2023 02:39
siamsiam_cifar10.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / check_dataaug_pytorch_tf2.ipynb
Created November 26, 2023 11:34
check_dataaug_pytorch_tf2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / simple_object_detection_resnet18.ipynb
Created November 5, 2023 11:09
simple_object_detection_resnet18.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / medmnist_sample_active_fix.ipynb
Created November 5, 2023 09:34
medmnist_sample_active_fix.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / medmnist_sample.ipynb
Created November 5, 2023 07:11
medmnist_sample.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / simple_object_detection.ipynb
Created October 29, 2023 09:36
simple_object_detection.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tocom242242
tocom242242 / debug
Last active October 28, 2023 07:38
debug
from IPython.core.debugger import Pdb; Pdb().set_trace()
@tocom242242
tocom242242 / numpy_to_torch_tensor.py
Last active April 5, 2022 23:54
numpy to torch.tensor
# https://pytorch.org/docs/stable/generated/torch.from_numpy.html
import torch
import numpy as np
x = np.array([1,2,3])
print(x)
x = torch.from_numpy(x)
import numpy as np
import pandas as pd
from oandapyV20 import API
import oandapyV20.endpoints.instruments as instruments
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error