kernel_id int64 24.2k 23.3M | prompt stringlengths 8 1.85M | completetion stringlengths 1 182k | comp_name stringlengths 5 57 |
|---|---|---|---|
11,684,407 | data_df_sample_submission = pd.read_csv('.. /input/hpa-single-cell-image-classification/sample_submission.csv')
test_files = os.listdir(".. /input/hpa-single-cell-image-classification/test")
color_list = ["_red.png", "_green.png", "_yellow.png", "_blue.png"]
test_files_names = [re.sub(r'|'.join(map(re.escape, color_l... | cnn.add(layer = tf.keras.layers.Dense(units = 108, activation='relu')) | Digit Recognizer |
11,684,407 | PATH_TEST = ".. /input/hpa-single-cell-image-classification/test"
MODEL_PATH = ".. /input/models-hpa/"
MODELS_LIST_EFFNET = [
"efficientnet-b4_rgby_lr_0.001_ADAM_steplr_g085_focal1_g1.0_resize640_mediumaug_3.pth",
"efficientnet-b4_rgby_lr_0.0015_ADAM_focal1_g1.0_resize640_10pcTest_HEAVY_AUG_E3_F0.pth",
"efficientnet-b4... | cnn.add(layer = tf.keras.layers.Dropout(0.5)) | Digit Recognizer |
11,684,407 | class CFG:
debug=False
verbose = False
num_workers=8
model_name_effnet = 'efficientnet-b4'
model_name_resnest = 'resnest101'
size=640
seed=2002
classes = 19
color_mode = "rgby"
resnest = True
effnet = True
extra_model_for_labels = True
extra_model_is_tf = True
only_green_extra_model = True
color_mode_image_level = "rgb... | cnn.add(layer = tf.keras.layers.Dense(units = 108, activation='relu')) | Digit Recognizer |
11,684,407 | Compose, OneOf, Normalize, Resize, RandomResizedCrop, RandomCrop, HorizontalFlip, VerticalFlip,
RandomBrightness, RandomContrast, RandomBrightnessContrast, Rotate, ShiftScaleRotate, Cutout,
IAAAdditiveGaussianNoise, Transpose, HueSaturationValue, CoarseDropout
)
dataset_mean = [0.0994, 0.0466, 0.0606, 0.0879]
dataset... | cnn.add(layer = tf.keras.layers.Dense(units = 10, activation = 'softmax')) | Digit Recognizer |
11,684,407 | def load_RGBY_image(image_id, path, mode="cam", image_size=None):
if mode == "green_model":
green = read_img_scale255(image_id, "green",path, image_size)
stacked_images = np.transpose(np.array([green, green, green]),(1,2,0))
return stacked_images
if mode=="cam":
red = read_img(image_id, "red", path, image_size)
green... | cnn.compile(optimizer = 'adam',
loss = 'sparse_categorical_crossentropy',
metrics = ['accuracy'] ) | Digit Recognizer |
11,684,407 | def build_decoder(with_labels=True, target_size=(300, 300), ext='jpg'):
def decode(path):
if CFG.color_mode_image_level == "ggg":
file_bytes = tf.io.read_file(path + "_green.png")
if ext == 'png':
img = tf.image.decode_png(file_bytes, channels=3)
elif ext in ['jpg', 'jpeg']:
img = tf.image.decode_jpeg(file_bytes, cha... | model_train = cnn.fit(x = X_train, y = y_train, validation_data =(X_val, y_val), epochs = 25 ) | Digit Recognizer |
11,684,407 | class Yield_Images_Dataset(Dataset):
def __init__(self, csv_file, root=PATH_TEST, transform=None):
self.images_df = csv_file
self.transform = transform
self.root = root
def __len__(self):
return len(self.images_df)
def __getitem__(self, idx):
if torch.is_tensor(idx):
idx = idx.tolist()
_id = self.images_df["ID"].iloc[... | y_pred = np.argmax(cnn.predict(testing), axis = -1 ) | Digit Recognizer |
11,684,407 |
NUCLEI_MODEL_URL, TWO_CHANNEL_CELL_MODEL_URL)
NORMALIZE = {"mean": [124 / 255, 117 / 255, 104 / 255], "std": [1 /(0.0167 * 255)] * 3}
class CellSegmentator(object):
def __init__(
self,
nuclei_model="./nuclei_model.pth",
cell_model="./cell_model.pth",
model_width_height=None,
device="cuda",
multi_channel_model=Tru... | predictions = pd.DataFrame({"ImageId" : list(range(1, len(y_pred)+1)) ,
"Label" : y_pred} ) | Digit Recognizer |
11,684,407 | <define_variables><EOS> | predictions.to_csv('predictions.csv', index = False ) | Digit Recognizer |
11,590,103 | <SOS> metric: categorizationaccuracy Kaggle data source: digit-recognizer<choose_model_class> | import pandas as pd
import numpy as np
import tensorflow as tf | Digit Recognizer |
11,590,103 | NUC_MODEL = ".. /input/hpacellsegmentatormodelweights/dpn_unet_nuclei_v1.pth"
CELL_MODEL = ".. /input/hpacellsegmentatormodelweights/dpn_unet_cell_3ch_v1.pth"
segmentator_even_faster = CellSegmentator(
NUC_MODEL,
CELL_MODEL,
device="cuda",
multi_channel_model=True,
padding=True,
return_without_scale_restore=True
)<cre... | train=pd.read_csv('/kaggle/input/digit-recognizer/train.csv')
print("Training Dataset Shape:",train.shape)
train.head() | Digit Recognizer |
11,590,103 | yield_ims_1728 = Yield_Images_Dataset(predict_df_1728)
yield_ims_2048 = Yield_Images_Dataset(predict_df_2048)
yield_ims_3072 = Yield_Images_Dataset(predict_df_3072)
yield_ims_4096 = Yield_Images_Dataset(predict_df_4096)
dataloader_ims_seg_1728 = DataLoader(yield_ims_1728, batch_size=24,
shuffle=False, num_workers=0... | test=pd.read_csv('/kaggle/input/digit-recognizer/test.csv')
print('Test Dataset Shape:',test.shape)
test.head() | Digit Recognizer |
11,590,103 | cell_masks_df = cell_masks_df.set_index('ID')
cell_masks_df = cell_masks_df.reindex(index=data_df['ID'])
cell_masks_df = cell_masks_df.reset_index()<set_options> | x=x.reshape(-1,28,28,1)
test=test.values.reshape(-1,28,28,1)
x=x/255
test=test/255
y=to_categorical(y ) | Digit Recognizer |
11,590,103 | del sizes_list
del even_faster_outputs
del output_ids
del segmentator_even_faster
del yield_ims_1728
del yield_ims_2048
del yield_ims_3072
del yield_ims_4096
del dataloader_ims_seg_1728
del dataloader_ims_seg_2048
del dataloader_ims_seg_3072
del dataloader_ims_seg_4096
del dataloaders_all_sizes
libc = ctypes.CDLL("libc... | train_datagen=ImageDataGenerator(
rotation_range=10,
width_shift_range=0.2,
height_shift_range=0.2,
zoom_range=0.2,
fill_mode='nearest'
) | Digit Recognizer |
11,590,103 | libc = ctypes.CDLL("libc.so.6")
libc.malloc_trim(0)
gc.collect()
torch.cuda.empty_cache()
torch.cuda.empty_cache()
torch.cuda.empty_cache()
torch.cuda.empty_cache()<prepare_x_and_y> | ensem=10
model=[0]*ensem
for i in range(ensem):
model[i]=Sequential()
model[i].add(Conv2D(filters=32,kernel_size=(3,3),padding='same',activation='relu',input_shape=(28,28,1)))
model[i].add(BatchNormalization())
model[i].add(Conv2D(filters=32,kernel_size=(3,3),padding='same',activation='relu'))
model[i].add(BatchNorma... | Digit Recognizer |
11,590,103 | X_test = data_df["ID"]<train_model> | callback=tf.keras.callbacks.EarlyStopping(monitor='accuracy',min_delta=0,patience=5,mode='auto',restore_best_weights=True,verbose=0)
lrs=tf.keras.callbacks.LearningRateScheduler(lambda x: 1e-3 * 0.95 ** x, verbose=0)
history=[0]*ensem
for i in range(ensem):
train_x,valid_x,train_y,valid_y=train_test_split(x,y,test_si... | Digit Recognizer |
11,590,103 | <create_dataframe><EOS> | prediction=np.zeros(( test.shape[0],10))
for i in range(ensem):
prediction=prediction+model[i].predict(test)
prediction=np.argmax(prediction,axis = 1)
prediction=pd.Series(prediction,name="Label")
submission = pd.concat([pd.Series(range(1,28001),name="ImageId"),prediction],axis=1)
submission.to_csv("digit_recognize... | Digit Recognizer |
11,517,111 | <SOS> metric: categorizationaccuracy Kaggle data source: digit-recognizer<set_options> | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
import tensorflow as tf
from kerastuner import HyperModel
from kerastuner.tuners import RandomSearch
from tensorflow.python.keras.callbacks import ModelCheckpoint
import seaborn as sns
from pylab ... | Digit Recognizer |
11,517,111 | def swish(x, beta=1.0):
return x * torch.sigmoid(beta*x)
def get_all_cams(batch_cam_scaled, model, scales, ims_per_batch):
bs = ims_per_batch
with torch.no_grad() :
ori_w, ori_h = CFG.size, CFG.size
strided_up_size =(CFG.size, CFG.size)
all_scale_cams = torch.from_numpy(np.zeros(( bs, len(scales), 19, CFG.size, CFG.s... | rcParams['figure.figsize'] = 15, 15
NUM_CLASSES = 10
INPUT_SHAPE =(28, 28, 1 ) | Digit Recognizer |
11,517,111 | label_names = [
'0-Nucleoplasm',
'1-Nuclear membrane',
'2-Nucleoli',
'3-Nucleoli fibrillar center',
'4-Nuclear speckles',
'5-Nuclear bodies',
'6-Endoplasmic reticulum',
'7-Golgi apparatus',
'8-Intermediate filaments',
'9-Actin filaments',
'10-Microtubules',
'11-Mitotic spindle',
'12-Centrosome',
'13-Plasma membrane',
'... | train = pd.read_csv('.. /input/digit-recognizer/train.csv')
test = pd.read_csv('.. /input/digit-recognizer/test.csv')
X = train.iloc[:, 1:]
y = train.iloc[:, 0] | Digit Recognizer |
11,517,111 | def encode_binary_mask(mask: np.ndarray)-> t.Text:
if mask.dtype != np.bool:
raise ValueError(
"encode_binary_mask expects a binary mask, received dtype == %s" %
mask.dtype)
mask = np.squeeze(mask)
if len(mask.shape)!= 2:
raise ValueError(
"encode_binary_mask expects a 2d mask, received shape == %s" %
mask.shape)... | X /= 256
test /= 256
X = X.values.reshape(( -1,)+ INPUT_SHAPE)
test = test.values.reshape(( -1,)+ INPUT_SHAPE ) | Digit Recognizer |
11,517,111 | def resize_mask(mask):
resized_mask = resize_full_mask(mask, CFG.size)
cell_masks = []
for i in range(1, np.max(mask)+1):
cell_masks.append(( resized_mask == i))
return cell_masks
def resize_full_mask(mask, size):
resized_mask = cv2.resize(mask,(size,size),interpolation=cv2.INTER_NEAREST_EXACT)
return resized_mask
<... | class CNNHyperModel(HyperModel):
def __init__(self, input_shape, num_classes):
self.input_shape = input_shape
self.num_classes = num_classes
def build(self, hp):
model = tf.keras.models.Sequential()
model.add(tf.keras.layers.Conv2D(8, 3, padding='same', dilation_rate=(3, 3), \
activation='relu', input_shape=self.input_... | Digit Recognizer |
11,517,111 | def get_pred_string(mask_probas, cell_masks_fullsize_enc):
assert len(mask_probas)== len(cell_masks_fullsize_enc), "Probas have different length than masks"
string = ""
for enc_mask, mask_proba in zip(cell_masks_fullsize_enc, mask_probas):
for cls, proba in enumerate(mask_proba):
string += str(cls)+ " " + str(proba)+ "... | hypermodel = CNNHyperModel(input_shape=INPUT_SHAPE, num_classes=NUM_CLASSES)
tuner = RandomSearch(
hypermodel,
objective='val_accuracy',
max_trials=24,
executions_per_trial=1,
directory='./random_search',
project_name='MNIST'
)
tuner.search_space_summary() | Digit Recognizer |
11,517,111 | PATH_SCALER_GRADBOOST = ".. /input/scaler-and-gradboost"
scaler_resnest0 = pickle.load(open(f"{PATH_SCALER_GRADBOOST}/scaler_resnest0.pkl", 'rb'))
scaler_resnest1 = pickle.load(open(f"{PATH_SCALER_GRADBOOST}/scaler_resnest1.pkl", 'rb'))
scaler_effnet0 = pickle.load(open(f"{PATH_SCALER_GRADBOOST}/scaler_effnet0.pkl", 'r... | X_train_val, X_test, y_train_val, y_test = train_test_split(X, y, test_size=1/7 ) | Digit Recognizer |
11,517,111 | class Classifier_EffNet(nn.Module, ABC_Model):
def __init__(self, backbone, num_classes=19):
super(Classifier_EffNet, self ).__init__()
self.enet = EfficientNet.from_name(backbone, num_classes=num_classes, in_channels=3, include_top=False)
dict_sizes = {
'efficientnet-b0' : 1280,
'efficientnet-b1' : 1280,
'efficientne... | search_results = tuner.search(X_train_val, y_train_val,
epochs=10, validation_split=1/6,
batch_size=100 ) | Digit Recognizer |
11,517,111 | def get_separate_labels(ims, model, model_for_labels_state, ims_per_batch, verbose=False):
bs = ims_per_batch
model.load_state_dict(model_for_labels_state["model_state_dict"])
with torch.no_grad() :
image_batch = copy.deepcopy(ims)
image_batch = image_batch.float()
image_batch_augs_fl2 = image_batch.flip(2)
image_ba... | best_model = tuner.get_best_models(num_models=1)[0]
best_model.summary()
print(best_model.evaluate(X_test, y_test)) | Digit Recognizer |
11,517,111 | sys.path.append(".. /input/faustomorales-vitkeras/vit_keras/")
CONFIG_B = {
"dropout": 0.1,
"mlp_dim": 3072,
"num_heads": 12,
"num_layers": 12,
"hidden_size": 768,
}
class TransformerBlock(tf.keras.layers.Layer):
def __init__(self, *args, num_heads=12, mlp_dim=3072, dropout=0.1, **kwargs):
super().__init__(*args, **... | def schedule(epoch, lr):
return 10**(-(epoch//10)-3)
lr_schedule = tf.keras.callbacks.LearningRateScheduler(schedule, verbose=1)
cb_checkpointer_val = ModelCheckpoint(filepath = '.. /working/best_val.hdf5',
monitor = 'val_accuracy',
save_best_only = True,
mode = 'auto' ) | Digit Recognizer |
11,517,111 | if CFG.resnest:
model_resnest = Classifier(CFG.model_name_resnest, CFG.classes, mode="normal")
if CFG.color_mode == "rgby":
weight = model_resnest.model.conv1[0].weight.clone()
model_resnest.model.conv1[0] = nn.Conv2d(4, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
with torch.no_grad() :
model_r... | X_train, X_val, y_train, y_val = train_test_split(X_train_val,
y_train_val,
test_size=1/6 ) | Digit Recognizer |
11,517,111 | def inference_one_batch(batch_cam, batch_ids_cam, batch_seg, ims_per_batch, batch_eff_tf=None, batch_rn_tf_600=None, batch_vit_tf_384=None, show_image=True, show_seg=True, verbose=True):
batch_ids_seg = tuple(batch_seg["ID"])
print(batch_ids_cam)
print(batch_ids_seg)
assert batch_ids_cam == batch_ids_seg, "IDS OF SE... | fit_history = best_model.fit(X_train, y_train, epochs=40, batch_size=100,
validation_data=(X_val, y_val),
callbacks = [lr_schedule, cb_checkpointer_val] ) | Digit Recognizer |
11,517,111 | libc = ctypes.CDLL("libc.so.6")
libc.malloc_trim(0)
gc.collect()
gc.collect()
gc.collect()
torch.cuda.empty_cache()
torch.cuda.empty_cache()
torch.cuda.empty_cache()
torch.cuda.empty_cache()<define_variables> | best_model.load_weights('./best_val.hdf5')
best_model.evaluate(X_test, y_test ) | Digit Recognizer |
11,517,111 | if CFG.is_demo:
index = 0
batch0, ids0 = next(itertools.islice(dl_test, index, None))
if CFG.extra_model_is_tf:
batch_tf_green = next(itertools.islice(dtest_tf_green_600, index, None))
batch_tf_rgb_600 = next(itertools.islice(dtest_tf_rgb_600, index, None))
batch_tf_rgb_384 = next(itertools.islice(dtest_tf_ggg_384, ind... | cb_checkpointer = ModelCheckpoint(filepath = '.. /working/best.hdf5',
monitor = 'accuracy',
save_best_only = True,
mode = 'auto' ) | Digit Recognizer |
11,517,111 | df = pd.DataFrame(columns=["image_id", "pred"])
i = 0
start_time = time.time()
ims_done = 0
for i,(( batch_cam, batch_ids_cam),(batch_tf_green_600),(batch_tf_rgb_600),(batch_tf_ggg_384)) in enumerate(zip(dl_test, dtest_tf_green_600, dtest_tf_rgb_600, dtest_tf_ggg_384)) :
ims_per_batch = len(batch_ids_cam)
batch_seg =... | final_fit_history = best_model.fit(X, y, epochs=40, batch_size=100,
callbacks = [lr_schedule, cb_checkpointer] ) | Digit Recognizer |
11,517,111 | sub = pd.merge(
data_df,
df,
how="left",
left_on='ID',
right_on='image_id',
)
def isNaN(num):
return num != num
for i, row in sub.iterrows() :
if isNaN(row['pred']): continue
sub.PredictionString.loc[i] = row['pred']
<save_to_csv> | best_model.load_weights('./best.hdf5' ) | Digit Recognizer |
11,517,111 | if all(df_from_files == data_df_sample_submission):
sub.to_csv("submission.csv",index=False)
<install_modules> | best_model.evaluate(X, y ) | Digit Recognizer |
11,517,111 | !pip install.. /input/kerasapplications/keras-team-keras-applications-3b180cb -f./ --no-index -q
!pip install.. /input/efficientnet/efficientnet-1.1.0/ -f./ --no-index -q<feature_engineering> | pred = pd.DataFrame({'ImageId' : np.arange(test.shape[0])+ 1,
'Label': best_model.predict(test ).argmax(axis=-1)})
pred.to_csv('pred.csv', index=False)
pred | Digit Recognizer |
11,226,330 | os.environ['SM_FRAMEWORK'] = 'tf.keras'
<load_pretrained> | pip install livelossplot | Digit Recognizer |
11,226,330 | MODEL_PATH = '.. /input/train-fpn-segmentation-model-no-43/'
with open(MODEL_PATH+'hparams.json')as json_file:
hparams = json.load(json_file)
hparams<normalization> | %matplotlib inline
| Digit Recognizer |
11,226,330 | IMG_SIZE = hparams['IMG_SIZE']
SCALE_FACTOR = hparams['SCALE_FACTOR']
K_SPLITS = hparams['K_SPLITS']
def read_tif_file(fname):
img = io.imread(fname)
img = np.squeeze(img)
if img.shape[0] == 3:
img = img.swapaxes(0,1)
img = img.swapaxes(1,2)
return img
def map_img2file(fname):
img = read_tif_file(fname)
dims = np.... | train_set = pd.read_csv('/kaggle/input/digit-recognizer/train.csv')
test_set = pd.read_csv('/kaggle/input/digit-recognizer/test.csv')
img_col = 28
img_row = 28 | Digit Recognizer |
11,226,330 | def rle_encode_less_memory(img):
pixels = img.T.flatten()
pixels[0] = 0
pixels[-1] = 0
runs = np.where(pixels[1:] != pixels[:-1])[0] + 2
runs[1::2] -= runs[::2]
return ' '.join(str(x)for x in runs )<feature_engineering> | X_train_df = train_set.drop(['label'],axis = 1)
y_train_df = train_set['label']
X_test_df = test_set
X_tr = np.asarray(X_train_df)/255
y_tr = np.asarray(y_train_df)
X_te = np.asarray(X_test_df)/255
print(type(X_tr))
print(X_tr.shape)
print(X_te.shape)
| Digit Recognizer |
11,226,330 | def create_TTA_batch(img):
if len(img.shape)< 4:
img = np.expand_dims(img, 0)
batch=np.zeros(( img.shape[0]*8,img.shape[1],img.shape[2],img.shape[3]), dtype=np.float32)
for i in range(img.shape[0]):
orig = tf.keras.preprocessing.image.img_to_array(img[i,:,:,:])/255.
batch[i*8,:,:,:] = orig
batch[i*8+1,:,:,:] = np.ro... | train_set['label'].value_counts().sort_index() | Digit Recognizer |
11,226,330 | MEANING_OF_LIFE = 42
MEANING_OF_LIFE_REV = int(str(MEANING_OF_LIFE)[::-1])
PATH = '.. /input/hubmap-kidney-segmentation/test/'
filelist = glob.glob(PATH+'*.tiff')
if len(filelist)== 5:
filelist = filelist[:1]
SUB_FILE = './submission.csv'
with open(SUB_FILE, 'w')as f:
f.write("id,predicted
")
MODELS = [MODEL_PATH+'F... | X_train_f = X_tr.reshape(42000,img_col,img_row,1)
X_test_f= X_te.reshape(28000,img_col,img_row,1)
y_train_f = to_categorical(y_tr)
y_train_f.shape[1] | Digit Recognizer |
11,226,330 | %rm -f *.dat<import_modules> | model = Sequential()
model.add(Conv2D(64,(4,4),padding = 'valid', input_shape=(28,28,1)))
model.add(BatchNormalization())
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(128,(2,2),padding = 'same'))
model.add(BatchNormalization())
model.add(Activation('relu'))
model.add(MaxP... | Digit Recognizer |
11,226,330 |
<save_to_csv> | init_lr = 1e-2
decay_steps = 150
alpha = 1e-5
beta = 1e-8
num_periods=4
lin_cos_dec1 = tf.keras.experimental.LinearCosineDecay(init_lr,
decay_steps,
num_periods=num_periods, alpha=alpha,
beta=beta, name='LinCosDec 1' ) | Digit Recognizer |
11,226,330 | submit_file = '.. /input/hubmaplocal/FrogUnetR34_ASPP_AttDecode_final_thr0.4.csv'
submission = pd.read_csv(submit_file, index_col='id')
sample_sub = pd.read_csv('.. /input/hubmap-kidney-segmentation/sample_submission.csv', index_col='id')
pub_ids = submission.index.values
predictions = submission.values
sample_sub.lo... | opt = Adam(lr=0.00005)
model.compile(optimizer=opt, loss='categorical_crossentropy', metrics=['accuracy'])
model.summary() | Digit Recognizer |
11,226,330 | !pip install.. /input/packages/pretrainedmodels-0.7.4-py3-none-any.whl
!pip install.. /input/segmentationmodelspytorch/segmentation_models/timm-0.1.20-py3-none-any.whl
!pip install.. /input/packages/efficientnet_pytorch-0.6.3-py2.py3-none-any.whl
!pip install.. /input/segmentationmodelspytorch/segmentation_models/segme... | epochs = 150
batch_size = 64
X_train, X_val, y_train, y_val = train_test_split(X_train_f, y_train_f, test_size=0.3 , random_state = 5)
image_gen = ImageDataGenerator(rotation_range = 25 ,shear_range = 0.25,zoom_range = [1.25,0.75],width_shift_range= 0.1,height_shift_range=0.1)
image_gen2 = ImageDataGenerator()
train_... | Digit Recognizer |
11,226,330 | !pip install git+https://github.com/qubvel/segmentation_models.pytorch<load_from_csv> | steps_per_epoch = train_batches.n//train_batches.batch_size
validation_steps = val_batches.n//val_batches.batch_size
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.75,patience=3, min_lr=0.00001, mode='auto',verbose=1)
callbacks = [PlotLossesKerasTF() , reduce_lr] | Digit Recognizer |
11,226,330 | sample_submission = pd.read_csv('.. /input/hubmap-kidney-segmentation/sample_submission.csv')
sample_submission = sample_submission.set_index('id')
seed = 1015
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def rle_en... | history=model.fit_generator(generator=train_batches, steps_per_epoch = steps_per_epoch, epochs=epochs,
validation_data=val_batches, validation_steps=validation_steps , callbacks=callbacks ) | Digit Recognizer |
11,226,330 | <choose_model_class><EOS> | predictions = model.predict_classes(X_test_f, verbose=0)
submissions=pd.DataFrame({"ImageId": list(range(1,len(predictions)+1)) ,
"Label": predictions})
submissions.to_csv("mysub5.csv", index=False, header=True ) | Digit Recognizer |
11,492,746 | <SOS> metric: categorizationaccuracy Kaggle data source: digit-recognizer<load_pretrained> | activations, regularizers, Sequential
, utils, callbacks, optimizers
)
Flatten, Dense, BatchNormalization
, Activation, Dropout, Conv2D, MaxPool2D
) | Digit Recognizer |
11,492,746 | PATH = ".. /input/hubmap-models2/"
model_names = [
"1_unet-timm-effb7_0.9509_epoch_28.pth",
"2_unet-timm-effb7_0.9488_epoch_28.pth",
"3_unet-timm-effb7_0.9503_epoch_29.pth",
"4_unet-timm-effb7_0.9500_epoch_28.pth",
"5_unet-timm-effb7_0.9518_epoch_27.pth",
]
models = []
for model_name in model_names:
models.append(torch... | BASEPATH = '.. /input/digit-recognizer/'
def reload(df='train.csv', msg=True, path=BASEPATH):
o = pd.read_csv(BASEPATH + df)
print(f'{df} loaded!')
return o
train = reload()
y_train = train.label.copy()
y_train = utils.to_categorical(y_train, 10)
X_train = train.drop(columns='label')
def preprocess(df):
df = df / 2... | Digit Recognizer |
11,492,746 | sz = 512
test_path = '.. /input/hubmap-kidney-segmentation/test/'
for step, person_idx in enumerate(test_files):
print(f'load {step+1}/{len(test_files)} data...')
img = tiff.imread(test_path + person_idx + '.tiff' ).squeeze()
if img.shape[0] == 3:
img = img.transpose(1,2,0)
predict_mask_l1 = np.zeros(( img.shape[0], ... | l1 = 0
l2 = 0.01
ini_lr = 0.001
val_size = 0.3
batch_size = 30
activation = 'relu'
if activation == 'selu':
initializer = 'lecun_normal'
elif activation in ['relu', 'elu']:
initializer = 'he_normal'
else:
initializer = 'glorot_normal'
sched_lr_val_acc = True
decay_rate = 0.97
X_tr, X_val, y_tr, y_val = train_test_split... | Digit Recognizer |
11,492,746 | !pip install.. /input/keras-applications/Keras_Applications-1.0.8/ -f./ --no-index
!pip install.. /input/image-classifiers/image_classifiers-1.0.0/ -f./ --no-index
!pip install.. /input/efficientnet-1-0-0/efficientnet-1.0.0/ -f./ --no-index
!pip install.. /input/segmentation-models/segmentation_models-1.0.1/ -f./ --no-... | def get_regularizer(l1=l1, l2=l2):
return regularizers.l1_l2(l1=l1, l2=l2)
def get_optimizer(lr=ini_lr, beta_1=0.9, beta_2=0.999
, decay_rate=decay_rate
, n_samples=n_train_samples, batch_size=batch_size):
if sched_lr_val_acc == False:
lr = optimizers.schedules.ExponentialDecay(
lr
, decay_steps = n_samples // batch_... | Digit Recognizer |
11,492,746 | %env SM_FRAMEWORK=tf.keras<set_options> | verbose = 1
model = get_model(n_samples=n_train_val_samples)
print(model.summary())
epochs = 100
cb = get_callbacks()
history = model.fit(tr_set, epochs = epochs
, steps_per_epoch = n_train_val_samples // batch_size
, validation_data = val_set
, callbacks = cb
, verbose = verbose ) | Digit Recognizer |
11,492,746 | warnings.filterwarnings('ignore')
print('tensorflow version:', tf.__version__)
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
gpu_devices = tf.config.experimental.list_physical_devices('GPU')
if gpu_devices:
for gpu_device in gpu_devices:
print('device available:', gpu_device)
pd.set_option('display.max_columns', None )<... | y_pred = model.predict(test_set)
y_pred = np.argmax(y_pred, axis=1)
submission = reload('sample_submission.csv')
submission['Label'] = y_pred
submission.to_csv('submission.csv', index=False ) | Digit Recognizer |
11,499,669 | TEST = True
KAGGLE = True
MDLS_FOLDS = {'v39': [0, 2, 3, 4]}
if KAGGLE:
DATA_PATH = '.. /input/hubmap-kidney-segmentation'
MDLS_PATHS = {ver: f'.. /input/kidney-models-{ver}'
for ver, _ in MDLS_FOLDS.items() }
else:
DATA_PATH = './data2'
MDLS_PATHS = {ver: f'./models_{ver}'
for ver, _ in MDLS_FOLDS.items() }
THRESHOLD ... | train, test = pd.read_csv('.. /input/digit-recognizer/train.csv'), \
pd.read_csv('.. /input/digit-recognizer/test.csv')
train.head() | Digit Recognizer |
11,499,669 | params_dict = {}
for ver, _ in MDLS_FOLDS.items() :
with open(f'{MDLS_PATHS[ver]}/params.json')as file:
params_dict[ver] = json.load(file)
for ver, params in params_dict.items() :
print('version:', ver, '| loaded params:', params, '
' )<categorify> | y_train = train['label']
x_train, x_test = train.iloc[:,1:], test | Digit Recognizer |
11,499,669 | def enc2mask(encs, shape):
img = np.zeros(shape[0] * shape[1], dtype=np.uint8)
for m, enc in enumerate(encs):
if isinstance(enc, np.float)and np.isnan(enc): continue
s = enc.split()
for i in range(len(s)// 2):
start = int(s[2 * i])- 1
length = int(s[2 * i + 1])
img[start : start + length] = 1 + m
return img.reshape(s... | x_train, x_test = x_train / 255., x_test / 255.
x_train, x_test = x_train.values.reshape(-1,28,28,1),\
x_test.values.reshape(-1,28,28,1 ) | Digit Recognizer |
11,499,669 | def dice_coef(y_true, y_pred, smooth=1):
y_true_f = K.flatten(y_true)
y_pred_f = K.flatten(y_pred)
intersection = K.sum(y_true_f * y_pred_f)
return(2 * intersection + smooth)/(K.sum(y_true_f)+ K.sum(y_pred_f)+ smooth)
def dice_loss(y_true, y_pred, smooth=1):
return(1 - dice_coef(y_true, y_pred, smooth))
def bce_dic... | y_train = to_categorical(y_train, num_classes=10 ) | Digit Recognizer |
11,499,669 | def make_grid(shape, window=256, min_overlap=32):
x, y = shape
nx = x //(window - min_overlap)+ 1
x1 = np.linspace(0, x, num=nx, endpoint=False, dtype=np.int64)
x1[-1] = x - window
x2 =(x1 + window ).clip(0, x)
ny = y //(window - min_overlap)+ 1
y1 = np.linspace(0, y, num=ny, endpoint=False, dtype=np.int64)
y1[-1] =... |
model = tf.keras.models.Sequential([
tf.keras.layers.Conv2D(filters=32, kernel_size=(5,5), \
activation='relu', input_shape=(28,28,1)) ,
tf.keras.layers.MaxPooling2D(pool_size=(2,2)) ,
tf.keras.layers.BatchNormalization() ,
tf.keras.layers.Conv2D(filters=64, kernel_size=(3,3), \
activation='relu', input_shape=(28,28,... | Digit Recognizer |
11,499,669 | img_files = [x for x in os.listdir(SUB_PATH)if '.tiff' in x]
print('images idxs:', img_files )<create_dataframe> |
num_epochs = 50
history = model.fit(x_train, y_train,
epochs=num_epochs,
callbacks=[
tf.keras.callbacks.EarlyStopping(monitor='loss', patience=6),
tf.keras.callbacks.ReduceLROnPlateau(monitor='loss', patience=4)
],
validation_split=0.2,
verbose=0 ) | Digit Recognizer |
11,499,669 | df_sub = pd.DataFrame(subm ).T
df_sub<save_to_csv> | scores = model.evaluate(x_train, y_train, batch_size=32)
print(f'Loss: {scores[0]} Accuracy: {scores[1]}' ) | Digit Recognizer |
11,499,669 | df_sub.to_csv('submission.csv', index=False )<set_options> | y_predicted = model.predict(x_test)
y_test_labels = np.argmax(y_predicted, axis=1 ) | Digit Recognizer |
11,499,669 | color = sns.color_palette()
%matplotlib inline
warnings.filterwarnings("ignore")
pd.set_option('display.max_columns', 500)
pd.set_option('display.max_rows', 50 )<load_from_csv> | x_test_ids = [(i + 1)for i in range(x_test.shape[0])] | Digit Recognizer |
11,499,669 | <feature_engineering><EOS> | results = pd.DataFrame({
'ImageId': x_test_ids,
'Label': y_test_labels
})
results.to_csv('submission.csv', index=False ) | Digit Recognizer |
11,088,069 | <SOS> metric: categorizationaccuracy Kaggle data source: digit-recognizer<filter> | DEVICE = "TPU"
SEED = 8080
FOLDS = 5
FOLD_WEIGHTS = [1./FOLDS]*FOLDS
BATCH_SIZE = 256
EPOCHS = 5000
MONITOR = "val_loss"
MONITOR_MODE = "min"
ES_PATIENCE = 5
LR_PATIENCE = 0
LR_FACTOR = 0.5
EFF_NET = 3
EFF_NET_WEIGHTS = 'noisy-student'
LABEL_SMOOTHING = 0.1
VERBOSE = 1 | Digit Recognizer |
11,088,069 | df_train[(df_train['floor'])== 33]<drop_column> | !pip install -q efficientnet >> /dev/null | Digit Recognizer |
11,088,069 | df_train.drop(df_train.index[7457], inplace=True )<data_type_conversions> | import numpy as np
import pandas as pd
from tqdm import tqdm
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow.keras.backend as K
import efficientnet.tfkeras as efn
from sklearn.model_selection import KFold
from keras.preprocessing.image import ImageDataGenerator | Digit Recognizer |
11,088,069 | df_train['year'] = df_train['timestamp'].apply(lambda x: x[:4] ).astype(int)
df_train['month'] = df_train['timestamp'].apply(lambda x: x[5:7] ).astype(int)
df_test['year'] = df_test['timestamp'].apply(lambda x: x[:4] ).astype(int)
df_test['month'] = df_test['timestamp'].apply(lambda x: x[5:7] ).astype(int )<sort_val... | if DEVICE == "TPU":
print("connecting to TPU...")
try:
tpu = tf.distribute.cluster_resolver.TPUClusterResolver()
print('Running on TPU ', tpu.master())
except ValueError:
print("Could not connect to TPU")
tpu = None
if tpu:
try:
print("initializing TPU...")
tf.config.experimental_connect_to_cluster(tpu)
tf.tpu.exp... | Digit Recognizer |
11,088,069 | missingValues = df_train.columns[df_train.isnull().any() ].tolist()
pd.isnull(df_train[missingValues] ).sum().sort_values(ascending=False )<define_variables> | train = pd.read_csv("/kaggle/input/digit-recognizer/train.csv")
train.describe() | Digit Recognizer |
11,088,069 | cols_fillna_mode = ['floor',
'product_type',
'num_room',
'state',
'hospital_beds_raion',
'build_count_brick',
'build_count_monolith',
'green_part_2000']
cols_fillna_mean = ['life_sq',
'metro_min_walk',
'metro_km_walk',
'railroad_station_walk_km',
'railroad_station_walk_min',
'cafe_sum_1500_min_price_avg',
'cafe_sum_150... | X = train.drop(labels=['label'], axis=1)
X = X.astype('float32')
X = X / 255
X = X.values.reshape(X.shape[0],28,28,1)
X = np.pad(X,(( 0,0),(2,2),(2,2),(0,0)) , mode='constant')
X = np.squeeze(X, axis=-1)
X = stacked_img = np.stack(( X,)*3, axis=-1)
X.shape | Digit Recognizer |
11,088,069 | for col in cols_fillna_mode:
df_train[col].fillna(df_train[col].mode().iloc[0],inplace=True)
df_test[col].fillna(df_train[col].mode().iloc[0],inplace=True)
for col in cols_fillna_mean:
df_train[col].fillna(df_train[col].mean() ,inplace=True)
df_test[col].fillna(df_train[col].mean() ,inplace=True )<define_variables> | y = train['label'].values.astype('float32')
y = tf.keras.utils.to_categorical(y, 10)
y | Digit Recognizer |
11,088,069 | numerical_features = df_train.dtypes[df_train.dtypes != "object"].index
categorical_features = df_train.dtypes[df_train.dtypes == "object"].index
print("Кол-во количественных признаков: ", len(numerical_features))
print("Кол-во категориальных признаков: ", len(categorical_features))<sort_values> | test = pd.read_csv("/kaggle/input/digit-recognizer/test.csv")
test.describe() | Digit Recognizer |
11,088,069 | df_train.isna().sum().sort_values(ascending=False )<drop_column> | X_test = test.astype('float32')
X_test = X_test / 255
X_test = X_test.values.reshape(X_test.shape[0],28,28,1)
X_test = np.pad(X_test,(( 0,0),(2,2),(2,2),(0,0)) , mode='constant')
X_test = np.squeeze(X_test, axis=-1)
X_test = stacked_img = np.stack(( X_test,)*3, axis=-1)
X_test.shape | Digit Recognizer |
11,088,069 | df_train.drop(['id', 'price_doc', 'timestamp'], axis=1, inplace=True)
id_test = df_test['id']
df_test.drop(['id', 'timestamp'], axis=1, inplace=True )<define_variables> | datagen = ImageDataGenerator(
featurewise_center=False,
samplewise_center=False,
featurewise_std_normalization=False,
samplewise_std_normalization=False,
zca_whitening=False,
rotation_range=10,
zoom_range = 0.1,
width_shift_range=0.1,
height_shift_range=0.1,
horizontal_flip=False,
vertical_flip=False
) | Digit Recognizer |
11,088,069 | numerical_features = df_train.dtypes[df_train.dtypes != "object"].index
categorical_features = df_train.dtypes[df_train.dtypes == "object"].index
print("Кол-во количественных признаков: ", len(numerical_features))
print("Кол-во категориальных признаков: ", len(categorical_features))<categorify> | eff_nets = [
efn.EfficientNetB0,
efn.EfficientNetB1,
efn.EfficientNetB2,
efn.EfficientNetB3,
efn.EfficientNetB4,
efn.EfficientNetB5,
efn.EfficientNetB6,
efn.EfficientNetB7,
efn.EfficientNetL2,
]
def build_model() :
inp = tf.keras.layers.Input(shape=(X.shape[1], X.shape[2], X.shape[3]))
oup = eff_nets[EFF_NET](
input_s... | Digit Recognizer |
11,088,069 | encoder = OneHotEncoder(handle_unknown='error')
encoder_cols_train = pd.DataFrame(encoder.fit_transform(df_train[categorical_features] ).toarray())
encoder_cols_test = pd.DataFrame(encoder.transform(df_test[categorical_features] ).toarray() )<categorify> | %%time
oof = np.zeros(( X.shape[0], y.shape[1]))
preds = np.zeros(( X_test.shape[0], y.shape[1]))
skf = KFold(n_splits=FOLDS,shuffle=True,random_state=SEED)
for fold,(idxT,idxV)in enumerate(skf.split(X)) :
if DEVICE=='TPU':
if tpu: tf.tpu.experimental.initialize_tpu_system(tpu)
print('
print('
print('
K.clear_session... | Digit Recognizer |
11,088,069 | encoder_cols_train.columns = encoder.get_feature_names(categorical_features)
encoder_cols_test.columns = encoder.get_feature_names(categorical_features)
encoder_cols_train.index = df_train.index
encoder_cols_test.index = df_test.index<drop_column> | final_predictions = pd.Series(np.argmax(preds, axis=1), name="Label")
submission = pd.concat([pd.Series(range(1,28001),name = "ImageId"),final_predictions], axis=1)
submission.to_csv("submission.csv",index=False)
submission.head() | Digit Recognizer |
11,040,563 | num_df_train = df_train.drop(categorical_features, axis=1)
num_df_test = df_test.drop(categorical_features, axis=1 )<categorify> | train = pd.read_csv(".. /input/digit-recognizer/train.csv")
test = pd.read_csv(".. /input/digit-recognizer/test.csv" ) | Digit Recognizer |
11,040,563 | df_train_encoded = pd.concat([num_df_train, encoder_cols_train], axis=1)
df_test_encoded = pd.concat([num_df_test, encoder_cols_test], axis=1)
print("Train dataset shape:", df_train_encoded.shape)
print("Test dataset shape:", df_test_encoded.shape )<sort_values> | ( x_train1, y_train1),(x_test1, y_test1)= mnist.load_data()
train1 = np.concatenate([x_train1, x_test1], axis=0)
y_train1 = np.concatenate([y_train1, y_test1], axis=0)
Y_train1 = y_train1
X_train1 = train1.reshape(-1, 28*28 ) | Digit Recognizer |
11,040,563 | df_train_encoded.median().sort_values(ascending=False )<train_model> | X_train = X_train / 255.0
test = test / 255.0
X_train1 = X_train1 / 255.0 | Digit Recognizer |
11,040,563 | X = df_train_encoded.drop(['price_doc_log'], axis=1)
y = df_train_encoded['price_doc_log']
print("X shape:", X.shape)
print("y shape:", y.shape )<split> | X_train = np.concatenate(( X_train.values, X_train1))
Y_train = np.concatenate(( Y_train, Y_train1)) | Digit Recognizer |
11,040,563 | X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=2022)
X_test = df_test_encoded<predict_on_test> | Y_train = to_categorical(Y_train, num_classes = 10 ) | Digit Recognizer |
11,040,563 | tree = DecisionTreeRegressor(random_state=2022, max_depth=5, min_samples_split=20)
tree.fit(X_train, y_train)
tree_predictions_log = tree.predict(X_val)
tree_predictions = np.exp(tree_predictions_log )<compute_test_metric> | random_seed = 2 | Digit Recognizer |
11,040,563 | print('RMSLE:', np.sqrt(mean_squared_log_error(np.exp(y_val), tree_predictions)) )<predict_on_test> | X_train, X_val, Y_train, Y_val = train_test_split(X_train, Y_train, test_size = 0.1, random_state=random_seed ) | Digit Recognizer |
11,040,563 | predict = np.exp(tree.predict(X_test))
submission = pd.DataFrame({'id': id_test, 'price_doc': predict})
submission.head()<save_to_csv> |
model = Sequential()
model.add(Conv2D(filters = 64, kernel_size =(5,5),padding = 'Same', activation ='relu', input_shape =(28,28,1)))
model.add(BatchNormalization())
model.add(Conv2D(filters = 64, kernel_size =(5,5),padding = 'Same', activation ='relu'))
model.add(BatchNormalization())
model.add(MaxPool2D(pool_siz... | Digit Recognizer |
11,040,563 | submission.to_csv('DecisionTree.csv', index=False )<prepare_x_and_y> | optimizer = RMSprop(lr=0.001, rho=0.9, epsilon=1e-08, decay=0.0 ) | Digit Recognizer |
11,040,563 | dmatrix_train = xgb.DMatrix(X_train, y_train)
dmatrix_val = xgb.DMatrix(X_val, y_val)
dmatrix_test = xgb.DMatrix(X_test )<train_model> | model.compile(optimizer = optimizer , loss = "categorical_crossentropy", metrics=["accuracy"] ) | Digit Recognizer |
11,040,563 | xgb_params = {
'eta': 0.05,
'max_depth': 5,
'subsample': 1.0,
'colsample_bytree': 0.7,
'objective': 'reg:squarederror',
'eval_metric': 'rmse',
'verbosity': 0
}
partial_model = xgb.train(xgb_params, dmatrix_train, num_boost_round=1000, evals=[(dmatrix_val, 'val')],
early_stopping_rounds=20, verbose_eval=20)
num_boost_r... | learning_rate_reduction = ReduceLROnPlateau(monitor='val_acc',
patience=3,
verbose=1,
factor=0.5,
min_lr=0.00001 ) | Digit Recognizer |
11,040,563 | model = xgb.train(dict(xgb_params, verbose=1), dmatrix_train, num_boost_round=num_boost_round )<predict_on_test> | epochs = 50
batch_size = 32 | Digit Recognizer |
11,040,563 | predict = np.exp(model.predict(dmatrix_val))
print('RMSLE:', np.sqrt(mean_squared_log_error(np.exp(y_val), predict)) )<predict_on_test> | Digit Recognizer | |
11,040,563 | ylog_pred = model.predict(dmatrix_test)
y_pred = np.exp(ylog_pred)
submission = pd.DataFrame({'id': id_test, 'price_doc': y_pred})
submission.head()<save_to_csv> | datagen = ImageDataGenerator(
featurewise_center=False,
samplewise_center=False,
featurewise_std_normalization=False,
samplewise_std_normalization=False,
zca_whitening=False,
rotation_range=10,
zoom_range = 0.1,
width_shift_range=0.1,
height_shift_range=0.1,
horizontal_flip=False,
vertical_flip=False)
datagen.fit(X_t... | Digit Recognizer |
11,040,563 | submission.to_csv("XGB_new_clear_submission.csv", index=False )<prepare_x_and_y> |
history = model.fit_generator(datagen.flow(X_train,Y_train, batch_size=batch_size),
epochs = epochs, validation_data =(X_val,Y_val),
verbose = 2, steps_per_epoch=X_train.shape[0] // batch_size
, callbacks=[learning_rate_reduction] ) | Digit Recognizer |
11,040,563 | dmatrix_train = xgb.DMatrix(X_train, y_train)
dmatrix_test = xgb.DMatrix(X_test )<init_hyperparams> | results = model.predict(test)
results = np.argmax(results,axis = 1)
results = pd.Series(results,name="Label" ) | Digit Recognizer |
11,040,563 | xgb_params = {
'eta': 0.05,
'max_depth': 5,
'subsample': 0.7,
'colsample_bytree': 0.7,
'objective': 'reg:squarederror',
'eval_metric': 'rmse',
'verbosity': 0
}<compute_train_metric> | submission = pd.concat([pd.Series(range(1,28001),name = "ImageId"),results],axis = 1)
submission.to_csv("cnn_mnist_submission.csv",index=False ) | Digit Recognizer |
9,740,221 | cv_output = xgb.cv(xgb_params,
dmatrix_train,
num_boost_round=1000,
early_stopping_rounds=20,
verbose_eval=50,
show_stdv=False)
num_boost_rounds = len(cv_output )<train_model> | import matplotlib.pyplot as plt | Digit Recognizer |
9,740,221 | model = xgb.train(dict(xgb_params, verbose=1), dmatrix_train, num_boost_round=num_boost_rounds )<predict_on_test> | train = pd.read_csv(".. /input/digit-recognizer/train.csv")
test = pd.read_csv(".. /input/digit-recognizer/test.csv" ) | Digit Recognizer |
9,740,221 | predict = np.exp(model.predict(dmatrix_test))
submission = pd.DataFrame({'id': id_test, 'price_doc': predict})
submission.head()<save_to_csv> | sample_submission = pd.read_csv('.. /input/digit-recognizer/sample_submission.csv' ) | Digit Recognizer |
9,740,221 | submission.to_csv('XGB_CV.csv', index=False )<split> | X_train = train.drop(['label'], axis = 1)
y_train = train['label']
X_test = test
X_train = X_train / 255.0
X_test = X_test / 255.0 | Digit Recognizer |
9,740,221 | X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=2022)
X_test = df_test_encoded<categorify> | X_train=X_train.values
X_test=X_test.values
test=test.values
X_train=X_train.reshape(X_train.shape[0], 28, 28, 1)
X_test=X_test.reshape(X_test.shape[0], 28, 28, 1)
test=test.reshape(test.shape[0] , 28 , 28 , 1 ) | Digit Recognizer |
9,740,221 | pca = PCA(n_components=20 ).fit(X_train)
X_train_pca=pca.transform(X_train)
X_val_pca=pca.transform(X_val )<prepare_x_and_y> | import tensorflow as tf
from tensorflow.keras.layers import Dense, Flatten, Conv2D, MaxPool2D, Dropout
from tensorflow.keras.models import Sequential
from tensorflow.keras.callbacks import EarlyStopping | Digit Recognizer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.