Pre k activities body parts

Couch to 5K

2010.01.27 21:44 tlc Couch to 5K

Anything related to the Couch-to-5K running programs or the like; open to all, noobie to pro.
[link]


2012.09.11 05:30 shoopdawhoop75 🚀 /𝗿/đ—•đ—Œđ—żđ—±đ—Č𝗿đ—čđ—źđ—»đ—±đ˜€đŸŻ - Borderlands 3 Reddit !

đ—§đ—”đ—Č đ—œđ—č𝗼𝗰đ—Č đ—łđ—Œđ—ż đ—Č𝘃đ—Čđ—żđ˜†đ˜đ—”đ—¶đ—»đ—Ž đ—•đ—Œđ—żđ—±đ—Č𝗿đ—čđ—źđ—»đ—±đ˜€ 𝟯 ! News, Speculations, Memes, Artwork... You name it!
[link]


2017.11.08 08:13 JasonReed234 CryptoCurrencyMemes

Welcome to CryptoCurrencyMemes! This sub is intended for the dankest cryptocurrency-related memes. Please follow the sub rules, remember to upvote and downvote, and have a good time!
[link]


2024.06.01 14:27 Narrow-Teacher-4332 How to get out of sleep paralysis

Hello, I do not regularly have sleep paralysis, in fact I think it's been years since I have before today but I believe I know how to get out of it. I will write a long list below but the thing to do is laugh. At least this works for me. I learned this many years ago as a child when I was stuck in a dream unable to move or speak and then I got a laught out and it has stuck with me ever since.
This morning (a few minutes ago) I was stuck in the worst dream like I was bound by paranormal activity and I tried to move and then I tried to tell my wife next to me and my voice wouldn't come out. I was stuck right there.
I instantly remembered "laugh". I have ingrained this so much inside me that if I am ever stuck "laugh" so after a few seconds I did. I made a small sound and what I realized from this is the outer edge (I would say like an inch deep} of my body was basically stuck in a paralyzed state but not deep within my chest where I got the noise to come from (note this is a forced laugh from deep within). Once the noise came out I tried to do it again. Now the paralysis was basically gone and I woke up .. exactly in the same place I was dreaming and with my wife next to me although she was awake with no idea about anything although she heard my laugh and understood what happened.
I'm just trying to analyze how it all works as it's crazy to me the way the body shuts down like that.
I do not know with certainty if this will work for others however I believe it will. I also haven't read the messages here. I just know sleep paralysis is a real thing as I learned about it in a public speaking class in college many years ago. I just wanted to share this so I can help someone who has it if it does work as this isn't something I was ever thought but learned on my own.
The main thing I've always told myself is if I am ever get in a paralyzed state like that to laugh and now the few times I have I have been able to get out in mere seconds as opposed to getting stuck.
Good luck everyone.
submitted by Narrow-Teacher-4332 to Sleepparalysis [link] [comments]


2024.06.01 14:26 Nonnny_ i made this void hand cannon in hopes bungie would add it in game!

i made this void hand cannon in hopes bungie would add it in game!
i’m really proud of this and believe it would be a great addition in game!
submitted by Nonnny_ to DestinyCreations [link] [comments]


2024.06.01 14:25 Jonasbru3m TensorFlow Model Only Predicts 2 Classes out of 475

Hello Reddit Community,
For my Bachelor Thesis im currently trying to train my first ever model with tensorflow, but I'm encountering a strange issue where my model only predicts 2 classes out of the 475 possible classes. The model was trained on a HPC with 304 Nvidia A100 and 352 Nvidia A40 GPGPUs in 82 nodes.
Thats my training script:
 import os import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import EfficientNetB7 from tensorflow.keras import layers, models from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard import tensorflow_addons as tfa import logging import json # Setup logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Check if GPUs are available gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) tf.config.set_visible_devices(gpus, 'GPU') logging.info(f"Using {len(gpus)} GPUs.") except RuntimeError as e: logging.error(e) else: logging.error("No GPUs found. Check your device configuration.") # Data directory data_dir = "/app/FOOD475/" # Image dimensions and batch size img_height, img_width = 600, 600 batch_size = 64 # Data preprocessing and augmentation train_datagen = ImageDataGenerator( rescale=1./255, rotation_range=40, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode='nearest', validation_split=0.25 ) # Load and preprocess images train_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='training' ) validation_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='validation' ) # Model creation function def create_model(input_shape, num_classes): base_model = EfficientNetB7(include_top=False, input_shape=input_shape, weights='imagenet') base_model.trainable = True inputs = layers.Input(shape=input_shape) x = base_model(inputs, training=True) x = layers.GlobalAveragePooling2D()(x) outputs = layers.Dense(num_classes, activation='softmax')(x) model = models.Model(inputs, outputs) return model def find_latest_saved_model(checkpoint_dir): logging.info(f"Looking in checkpoint directory: {checkpoint_dir}") if not os.path.exists(checkpoint_dir): logging.error(f"Checkpoint directory does not exist: {checkpoint_dir}") return None, 0 subdirs = [os.path.join(checkpoint_dir, d) for d in os.listdir(checkpoint_dir) if os.path.isdir(os.path.join(checkpoint_dir, d))] if not subdirs: logging.info("No subdirectories found for checkpoints.") return None, 0 latest_subdir = max(subdirs, key=lambda x: int(os.path.basename(x))) latest_epoch = int(os.path.basename(latest_subdir)) logging.info(f"Latest model directory: {latest_subdir}, Epoch: {latest_epoch}") if os.path.exists(os.path.join(latest_subdir, 'saved_model.pb')): return latest_subdir, latest_epoch else: logging.info("No saved_model.pb found in the latest directory.") return None, 0 # Mirrored strategy for multi-GPU training strategy = tf.distribute.MirroredStrategy() with strategy.scope(): saved_model_dir = 'model_training' checkpoint_dir = os.path.join(saved_model_dir, 'checkpoints') latest_saved_model, latest_epoch = find_latest_saved_model(checkpoint_dir) if latest_saved_model: logging.info(f"Loading model from {latest_saved_model}") model = tf.keras.models.load_model(latest_saved_model) else: logging.info("No saved model found. Creating a new model.") model = create_model((img_height, img_width, 3), len(train_generator.class_indices)) if not os.path.exists(saved_model_dir): os.makedirs(saved_model_dir) summary_path = os.path.join(saved_model_dir, 'model_summary.txt') with open(summary_path, 'w') as f: model.summary(print_fn=lambda x: f.write(x + '\n')) logging.info(f"Model summary saved to {summary_path}") optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002) model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy', tf.keras.metrics.TopKCategoricalAccuracy(k=5), tfa.metrics.F1Score(num_classes=len(train_generator.class_indices), average='macro')]) # Custom Callback for Saving the Best Model in SavedModel format class SaveBestModelTF(tf.keras.callbacks.Callback): def __init__(self, monitor='val_accuracy', saved_model_dir='model_training'): super(SaveBestModelTF, self).__init__() self.monitor = monitor self.saved_model_dir = saved_model_dir def on_epoch_end(self, epoch, logs=None): current = logs.get(self.monitor) if current is None: logging.warning(f"Monitor '{self.monitor}' for saving the model is not available in logs.") return logging.info(f"Epoch {epoch + 1}: saving model to {self.saved_model_dir}/checkpoints/{epoch + 1}") epoch_path = os.path.join(self.saved_model_dir, 'checkpoints', str(epoch + 1)) if not os.path.exists(epoch_path): os.makedirs(epoch_path) self.model.save(epoch_path, save_format='tf') # Callbacks for monitoring progress tensorboard_cb = TensorBoard(log_dir='./logs') # Save class indices to a JSON file class_indices_path = 'model_training/class_indices.json' if not os.path.exists(os.path.dirname(class_indices_path)): os.makedirs(os.path.dirname(class_indices_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(class_indices_path)} created.") with open(class_indices_path, 'w') as file: json.dump(train_generator.class_indices, file) logging.info(f"Class indices saved to {class_indices_path}") # Model training total_epochs = 7 model.fit( train_generator, initial_epoch=latest_epoch, # Start from the next epoch epochs=total_epochs, validation_data=validation_generator, callbacks=[SaveBestModelTF(saved_model_dir=saved_model_dir), tensorboard_cb] ) # Evaluate the model eval_result = model.evaluate(validation_generator) logging.info(f'Validation Loss: {eval_result[0]}, Validation Accuracy: {eval_result[1]}') # Save the final model as a SavedModel format (including .pb files) model.save('model_training/finished_model') logging.info("Finished model saved in SavedModel format at 'model_training/finished_model'") # Convert to TensorFlow Lite converter = tf.lite.TFLiteConverter.from_saved_model('model_training/finished_model') tflite_model = converter.convert() tflite_path = 'model_training/lite_model/trained_model_lite.tflite' if not os.path.exists(os.path.dirname(tflite_path)): os.makedirs(os.path.dirname(tflite_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(tflite_path)} created.") with open(tflite_path, 'wb') as f: f.write(tflite_model) logging.info(f"Model converted and saved as {tflite_path}") 
During training i got following output:
Found 182235 images belonging to 475 classes. Found 60544 images belonging to 475 classes. Epoch 1/7 2848/2848 [==============================] - 11914s 4s/step - loss: 1.7624 - accuracy: 0.5931 - top_k_categorical_accuracy: 0.8152 - f1_score: 0.4739 - val_loss: 1.1666 - val_accuracy: 0.7043 - val_top_k_categorical_accuracy: 0.9013 - val_f1_score: 0.6053 Epoch 2/7 2848/2848 [==============================] - 11096s 4s/step - loss: 0.8293 - accuracy: 0.7788 - top_k_categorical_accuracy: 0.9435 - f1_score: 0.7094 - val_loss: 0.9409 - val_accuracy: 0.7533 - val_top_k_categorical_accuracy: 0.9277 - val_f1_score: 0.6818 Epoch 3/7 2848/2848 [==============================] - 11123s 4s/step - loss: 0.6247 - accuracy: 0.8274 - top_k_categorical_accuracy: 0.9632 - f1_score: 0.7760 - val_loss: 0.8422 - val_accuracy: 0.7761 - val_top_k_categorical_accuracy: 0.9386 - val_f1_score: 0.7080 Epoch 4/7 2848/2848 [==============================] - 11101s 4s/step - loss: 0.5070 - accuracy: 0.8562 - top_k_categorical_accuracy: 0.9743 - f1_score: 0.8165 - val_loss: 0.8002 - val_accuracy: 0.7885 - val_top_k_categorical_accuracy: 0.9428 - val_f1_score: 0.7249 Epoch 5/7 2848/2848 [==============================] - 11079s 4s/step - loss: 0.4261 - accuracy: 0.8766 - top_k_categorical_accuracy: 0.9814 - f1_score: 0.8445 - val_loss: 0.7757 - val_accuracy: 0.7940 - val_top_k_categorical_accuracy: 0.9458 - val_f1_score: 0.7404 Epoch 6/7 2848/2848 [==============================] - 11100s 4s/step - loss: 0.3641 - accuracy: 0.8932 - top_k_categorical_accuracy: 0.9856 - f1_score: 0.8657 - val_loss: 0.7639 - val_accuracy: 0.8003 - val_top_k_categorical_accuracy: 0.9472 - val_f1_score: 0.7432 Epoch 7/7 2848/2848 [==============================] - 11129s 4s/step - loss: 0.3142 - accuracy: 0.9068 - top_k_categorical_accuracy: 0.9889 - f1_score: 0.8838 - val_loss: 0.7701 - val_accuracy: 0.8014 - val_top_k_categorical_accuracy: 0.9470 - val_f1_score: 0.7474 946/946 [==============================] - 2671s 3s/step - loss: 0.7682 - accuracy: 0.8008 - top_k_categorical_accuracy: 0.9470 - f1_score: 0.7456 
And when I try to load the model and make a prediction with this code:
class own: def __init__(self): if not os.path.exists("models/own"): raise FileNotFoundError(f"Model path models/own does not exist") try: self.model = tf.keras.models.load_model("models/own", custom_objects={'F1Score': F1Score}) except Exception as e: print(f"Error loading model: {e}") raise if not os.path.exists("models/own/class_indices.json"): raise FileNotFoundError(f"Class indices path models/own/class_indices.json does not exist") with open("models/own/class_indices.json", 'r') as file: self.class_indices = json.load(file) self.index_to_class = {v: k for k, v in self.class_indices.items()} def classify(self, img_path): if not os.path.exists(img_path): raise FileNotFoundError(f"Image path {img_path} does not exist") # Load and preprocess the image img = tf.keras.preprocessing.image.load_img(img_path, target_size=(600, 600)) img_array = tf.keras.preprocessing.image.img_to_array(img) img_array = np.expand_dims(img_array, axis=0) img_array /= 255.0 # Make prediction predictions = self.model.predict(img_array) print("Raw predictions:", predictions) top_index = np.argmax(predictions[0]) top_class = self.index_to_class[top_index] print(f"Top class: {top_class}, Probability: {predictions[0][top_index]}") top_n = 5 top_indices = np.argsort(predictions[0])[-top_n:][::-1] for idx in top_indices: print(f"Class: {self.index_to_class[idx]}, Probability: {predictions[0][idx]}") return top_class 
it always either predicts Steak or Omelette:
2024-06-01 14:17:27.571776: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead. C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\tfa_eol_msg.py:23: UserWarning: TensorFlow Addons (TFA) has ended development and introduction of new features. TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024. Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). For more information see: warnings.warn( C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\ensure_tf_install.py:53: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.12.0 and strictly below 2.15.0 (nightly versions are not supported). The versions of TensorFlow you are currently using is 2.15.0 and is not supported. Some things might work, some things might not. If you were to encounter a bug, do not file an issue. If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version. You can find the compatibility matrix in TensorFlow Addon's readme: warnings.warn( WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\saving\legacy\saved_model\load.py:107: The name tf.gfile.Exists is deprecated. Please use tf.io.gfile.exists instead. 2024-06-01 14:17:31.363666: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\engine\functional.py:156: The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\layers\normalization\batch_normalization.py:979: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead. 1/1 [==============================] - 4s 4s/step Raw predictions: [[4.23421043e-05 1.45377373e-06 1.09034730e-02 1.19525917e-04 4.45407240e-05 5.72818244e-05 5.68609731e-03 5.15926695e-05 1.89958355e-05 1.39491487e-04 3.20717366e-03 9.63417915e-06 1.22947793e-03 4.01171012e-04 3.64649204e-05 1.75396308e-05 3.09416023e-03 7.56465085e-03 2.89075997e-05 3.90331191e-03 2.16231216e-03 4.18351328e-06 5.89632022e-04 9.40740295e-03 6.80321036e-03 2.32697069e-03 4.23964392e-03 1.56047070e-04 2.14435873e-04 6.95710623e-05 1.38103365e-04 1.78470847e-03 3.75193194e-03 5.94434096e-03 5.69255608e-05 7.57165905e-03 1.52613886e-03 9.48755944e-04 8.21925176e-04 3.18029453e-03 3.89393512e-03 8.41296278e-05 8.34997976e-04 3.14124190e-04 6.81638776e-04 1.10320523e-02 1.10815199e-04 6.18589204e-03 2.17406079e-02 3.72037102e-05 1.65579877e-05 1.30886221e-02 1.01435784e-04 2.13157946e-05 1.25499619e-05 8.94762017e-03 4.36880719e-03 4.78018774e-03 8.53170827e-03 1.45823974e-02 1.05571962e-05 1.12631078e-05 5.09415939e-03 8.12840741e-03 1.48212257e-05 1.52864438e-02 9.66716034e-05 2.25000476e-04 3.60531732e-04 9.28066402e-06 8.15156789e-04 1.09069003e-02 3.43796797e-04 2.53324561e-05 7.89516326e-03 1.44943051e-05 4.06841224e-04 1.67445414e-05 3.78527766e-05 1.80476491e-04 3.33699776e-04 4.13847056e-06 3.32273915e-03 6.51864940e-03 7.48403618e-05 2.68448726e-04 1.54245936e-03 2.95383972e-03 2.26996126e-05 3.64100002e-03 2.81597768e-05 3.11967051e-05 1.48438021e-05 8.46863433e-04 4.05767525e-04 1.75380992e-04 4.76581818e-06 5.42160356e-04 2.19287374e-03 1.18714366e-02 1.41884899e-04 8.76697595e-06 3.85931274e-03 4.37544841e-05 4.01919424e-05 3.87528981e-03 3.88057524e-05 2.69062322e-04 4.46968805e-03 1.17368818e-05 3.70194939e-05 1.55831876e-04 1.63894765e-05 2.38729117e-04 1.19046052e-03 2.12675819e-04 1.08185853e-03 3.01667496e-05 6.18575094e-03 3.91955400e-05 1.40065713e-05 3.02084809e-04 6.46927813e-03 3.37069832e-05 5.15250103e-05 2.31142567e-05 2.20274273e-03 3.17445702e-05 1.04452763e-02 6.80019803e-05 7.81101780e-03 1.23853814e-02 1.04819983e-02 3.20679283e-05 6.71340758e-03 6.94293885e-06 1.98310101e-03 5.29599565e-05 9.02036484e-03 4.57535089e-06 1.93145883e-03 4.06190008e-03 8.42716638e-03 1.50314684e-03 8.58115556e-04 1.22383237e-03 8.49474862e-04 5.48258470e-03 6.09953167e-05 1.57669128e-03 5.43692382e-03 4.88058169e-04 6.75312986e-05 3.43937165e-04 1.93276245e-03 4.06867871e-03 5.20323374e-05 7.78318281e-05 1.93508764e-04 1.14409677e-05 2.21324177e-03 1.90052821e-03 8.52691382e-03 2.43102224e-03 2.88419239e-03 2.53974522e-05 9.51182563e-04 2.32981285e-03 9.86064842e-05 4.14316915e-03 1.66544644e-03 1.02754391e-04 3.95776224e-05 3.02393187e-06 1.32082617e-02 4.14707232e-04 3.40229672e-05 4.81802830e-03 1.90598912e-05 4.08358377e-04 5.95443300e-04 1.22634810e-04 5.74091624e-04 8.57623760e-03 2.60962266e-03 2.95263715e-03 1.58088005e-05 1.64122172e-02 2.09987498e-04 2.36775051e-03 3.00696083e-05 3.46693669e-05 1.16249910e-04 6.94001559e-03 1.58400853e-05 1.95188422e-05 2.19169408e-04 3.09433235e-04 5.44128183e-04 6.35302160e-04 7.07127433e-03 1.19772732e-04 5.37439200e-06 1.91133395e-02 1.27979312e-02 3.89739592e-03 1.97048103e-05 2.29625002e-05 2.21050854e-04 1.92064399e-04 1.20139657e-05 3.20516920e-05 4.26828819e-06 3.64828011e-05 7.55213068e-06 2.67963973e-03 3.17923805e-05 6.19895945e-05 3.99544797e-06 2.68664648e-04 1.83274597e-02 8.71072552e-05 1.38439747e-04 4.96710254e-06 3.56023484e-05 1.34899991e-03 2.05766381e-04 3.96062108e-03 5.61600551e-03 5.31910664e-05 6.77773132e-05 1.36139952e-02 7.41477634e-05 1.63904135e-03 4.74587978e-06 1.45082246e-04 2.09337009e-06 8.13181920e-04 3.63194500e-04 6.46722084e-03 5.02364383e-05 6.90550078e-05 6.36972545e-05 2.09673337e-04 1.79036579e-05 2.36021675e-04 6.37291942e-06 5.70875318e-06 2.56235455e-03 2.72009202e-04 3.77103061e-05 5.63449021e-06 2.25979857e-05 2.61697169e-05 3.42375762e-03 1.04161156e-02 2.22223607e-05 6.27681802e-05 1.88465419e-04 2.82149922e-05 4.01149562e-04 1.31122259e-04 5.97863036e-05 2.41098423e-05 7.71318519e-05 3.57087993e-04 3.41462255e-05 1.01930054e-04 5.23206063e-06 2.95026781e-04 7.02897159e-05 3.99115682e-02 1.89455808e-03 1.74146010e-06 1.14775894e-05 7.84916210e-06 1.93041191e-03 2.37918808e-03 3.49449110e-03 6.98623667e-03 7.64393993e-03 4.12582303e-05 1.24030013e-03 1.72785169e-03 7.18316660e-05 5.17749111e-04 7.84919783e-03 1.04525541e-04 9.83856899e-06 8.77521088e-05 1.68125369e-02 4.09213862e-05 1.09552668e-04 2.54421811e-05 4.65482954e-05 6.95294410e-04 6.72869501e-05 2.40904570e-04 2.15112406e-04 3.85226776e-05 2.51369456e-05 4.68338234e-03 1.26862462e-04 9.00995801e-04 4.16984549e-05 7.36891707e-06 1.51534463e-04 1.48332631e-03 4.95935837e-03 1.91499032e-02 3.01804044e-04 6.28613270e-05 4.78365598e-03 8.38827982e-05 1.70516931e-02 1.52653758e-03 5.85798814e-04 3.11521399e-05 2.11968741e-04 7.41351105e-05 1.40834545e-05 8.93215940e-04 1.45371505e-05 4.96711982e-05 4.11317131e-04 8.89070239e-03 5.06997202e-03 3.08362325e-03 2.77415646e-04 3.75299685e-04 1.19906381e-05 1.50029315e-03 1.14443043e-04 2.52026439e-05 9.22407198e-04 3.51146841e-03 1.11564566e-06 1.36691102e-04 3.53032886e-03 2.15746608e-04 8.79282816e-05 4.36248304e-03 1.77966576e-04 1.47887832e-03 6.94399816e-04 8.03673174e-04 5.23004041e-04 3.90421192e-04 1.06344873e-03 3.55399796e-04 6.01265463e-04 1.55850008e-04 1.33491016e-03 1.09734829e-04 4.38019342e-04 2.42487862e-04 6.84730615e-03 1.02040754e-03 1.07652310e-03 3.51822848e-04 9.20735547e-05 7.50967592e-04 1.44127226e-02 3.58455327e-05 5.16555374e-05 1.31370616e-03 9.02966480e-04 1.24254671e-03 5.20300702e-04 8.57163919e-04 3.66344648e-05 2.01024144e-04 6.52487564e-04 5.93215809e-04 5.76604251e-03 6.19325438e-04 1.16480421e-03 2.37531040e-05 2.50119111e-03 7.08868974e-05 5.99786472e-05 2.55976247e-05 4.62695534e-05 4.24469297e-04 6.20667648e-04 4.15926515e-05 7.03983005e-06 8.77018738e-06 5.21141301e-05 2.11411956e-04 7.74205779e-04 5.31276630e-04 6.44316664e-04 4.07212786e-03 2.68336060e-03 1.74210854e-05 3.76385942e-05 6.74255705e-03 4.46323538e-05 2.76757801e-05 2.56290223e-04 1.22213329e-04 1.22734054e-03 7.73016480e-04 1.11903930e-02 3.16570923e-02 2.75775470e-04 5.73344238e-04 2.86890985e-03 1.10085262e-03 1.35615155e-05 2.66479654e-03 1.99418981e-03 4.31017601e-04 9.68350447e-04 3.51598108e-04 8.54862970e-04 3.52715979e-05 1.46333405e-04 5.10955288e-05 1.48639630e-03 1.80458324e-03 7.51840998e-05 1.13529910e-04 3.89828119e-06 8.74532212e-04 1.12358983e-04 3.93593837e-05 6.01037289e-04 2.06997487e-04 3.94766452e-03 1.09549124e-04 2.11403880e-04 6.95336203e-04 5.99777419e-03 5.45272342e-05 2.56420486e-03 2.20299728e-04 4.23851707e-05 6.69996080e-04 2.66609713e-04 1.55276459e-04 2.75739990e-02 3.43240798e-03 2.68303775e-05 1.52821158e-04 9.82575657e-05 4.00313947e-05 6.07266993e-05 5.28094570e-05 1.02948405e-04 6.20577412e-05 2.12161940e-05 2.99842539e-03 1.17558768e-04 1.58015324e-03 3.30074807e-04 1.19093776e-04 2.52985101e-05 1.59350988e-02 4.89539379e-05 1.05491054e-05 1.09012712e-04 2.97089737e-05 7.28885690e-03 1.87386977e-05 1.85028894e-05 5.79945299e-05 1.54079917e-05 9.85169099e-05 1.05076749e-03 7.55816349e-04 2.62255053e-05 1.18091421e-05 2.95209320e-05]] Top class: omelette, Probability: 0.03991156816482544 Class: omelette, Probability: 0.03991156816482544 Class: steak, Probability: 0.03165709227323532 Class: tacos, Probability: 0.027573999017477036 Class: breakfast_burrito, Probability: 0.021740607917308807 Class: pulled_pork_sandwich, Probability: 0.01914990320801735 (own): omelette - 3.66shttps://github.com/tensorflow/addons/issues/2807https://github.com/tensorflow/addons 
Help would be appreciated because im slowly losing my mind :(,
Jonas
submitted by Jonasbru3m to computervision [link] [comments]


2024.06.01 14:25 Pik-spareparts Top-Quality Car Spare Parts Available in India at Pikpart

Top-Quality Car Spare Parts Available in India at Pikpart
In India, there are several duties associated with owning an vehicle, the primary one being preservation. Regular servicing, timely repairs, and Top-Quality Cars Spare Parts are crucial for maintaining your vehicle walking smoothly and properly. For many car proprietors in India, finding dependable spare parts may be a challenge. Currently, Pikpart has emerged as a leading issuer of Top-Quality Spare Parts in India within the country. Here’s why Pikpart is the desired choice for vehicle proprietors throughout India.

Extensive Range of Spare Parts:

Pikpart gives an in depth variety of spare parts for various vehicle fashions, from financial system vehicles to luxury cars. Whether you want engine parts, brake structures, suspension parts, electrical parts, or body parts, Pikpart Online Shopping For Car has you included. Their comprehensive inventory ensures that you can discover the precise part you need on your specific car model, all in one location. This saves you time and the trouble of looking multiple stores or online systems.
  • Focus to Excellence: Quality is paramount in relation to Top-Quality Cars Spare Parts. Substandard parts can cause frequent breakdowns, increased preservation fees, and even safety risks. Pikpart knows this and is committed to offering most effective the very best nice parts. They supply their products from official producers and conduct rigorous first-rate assessments. This determination to nice approach you can trust that any element you purchase from Pikpart will perform reliably and closing longer, maintaining your automobile in pinnacle situation.
  • Affordable Pricing: Maintaining a car can be high-priced, especially in relation to changing parts. Pikpart goals to make extraordinary spare parts less costly for all car owners. They offer competitive fees on all their products, its also ensuring you get the great cost on your money. Moreover, Pikpart frequently runs promotions and reductions, permitting you to shop even extra on your purchases. This commitment to affordability makes Pikpart an amazing preference for finances-conscious automobile owners.
  • Convenient Online Shopping: Convenience is essential in today's fast-paced, modern global society. Pikpart has made shopping for car spare parts smooth and handy with their consumer-pleasant online keep. You can browse their sizeable catalog from the comfort of your own home, compare expenses, read consumer opinions, and make informed selections. The website is well-prepared, making it simple to locate the exact parts you want in your precise car version.
  • Fast and Reliable Delivery: They have a robust logistics community that covers all major cities and cities throughout India. Fast shipping times suggest you don’t have to wait lengthy to get your automobile lower back on the road. Additionally, they offer tracking information so that you can screen the development of your delivery in real-time.
https://preview.redd.it/xv6vyfjxdy3d1.png?width=800&format=png&auto=webp&s=80a3f35605b2e8578231df0aa66a44ee4151a34e
  • Expert Customer Support: Choosing the proper spare part can every so often be difficult, especially if you’re no longer familiar with the technical factors of your vehicle. Pikpart Car Spare Parts offers notable customer service that will help you make the proper choice. Their informed and pleasant customer service group is to be had to reply your questions, offer suggestions, and help you for the duration of the searching for approach. This customized assist guarantees you get the right detail the first time, decreasing the hassle of returns and exchanges.
  • Dedicated to Sustainability: Pikpart Four Wheeler Spare Parts is also dedicated to sustainability and green practices. They sell using tremendous parts that extend the existence of your car, reducing the need for frequent replacements. Additionally, they make sure that their packaging is environmentally friendly and minimize waste anywhere feasible. By deciding on Pikpart, you’re not handiest looking after your automobile but additionally contributing to a greener planet.
  • Community Engagement: Pikpart is greater than only a store; they're an active part of the automotive community in India. They often have interaction with their clients via social media, and events. They offer treasured guidelines on vehicle maintenance, protection, and performance upgrades. This network engagement helps vehicle proprietors stay knowledgeable and linked, promoting a sense of community among believers for automobiles.

Conclusion:

Pikpart is a top desire for Top-Quality Spare Parts in India, providing a combination of first-class, affordability, comfort, and first-rate customer service. Whether you’re a informal driving force or a car enthusiast, Pikpart has the right parts to keep your vehicle walking smoothly. Their dedication to sustainability and community engagement in addition units them apart within the marketplace. So, the subsequent time you need spare parts in your vehicle, appearance no in addition than Pikpart - your trusted companion on the road.
submitted by Pik-spareparts to pikpost [link] [comments]


2024.06.01 14:25 ziyal79 Safety

My life has been hard lately. In summary, I've lost two jobs in the 3 months. The first one because of my PTSD (I was working in legal services with survivors and perpetrators and it was triggering me) and the second one because I didn't have the skills my boss wanted. Because of this, I've had to declare bankruptcy. I've been leaning hard on my ED to cope.
I've been spending my time carefully curating my caloric intake and spending an hour and a half to two hours each day at the gym doing a mixture of weight training and cardio. While this isn't actively disordered because I'm sticking to limits set by my dietitian and personal trainer, it feels like I'm walking on a tightrope. There's a part of me that doesn't want to get another job because then I'll have the time to focus on my food and exercise without distraction.
My ED is making me feel safe when everything else is so up in the air. I can't really tell if this is just par for the course or is something to be worried about.
Does anyone have any thoughts or advice?
submitted by ziyal79 to EDAnonymous [link] [comments]


2024.06.01 14:24 EvilZero86 Super Manifestation 3: Superman of God

Walking in the glow of the consciousness, the everlasting, the one who is forever, resting in the eternal slumber of the infinite. This power surges through you as you reach that state of the present bliss, the present moment, the present peace. The peace that is forever in this calm state of the heart while in the face of all your troubles, all your doubts, all your fears transforming, integrating, transmuting into something greater than before. As you walk illuminating the darkness, bending reality, and altering time and space. You are the god self, the super self, the ultra-instinct of God in man.
As you reach this state of the super consciousness in this fast the being is magnified and the powers are activated. Powers transcending time and space. Powers bending reality to the mind. Powers effecting everything and everyone that surrounds the consciousness, the everlasting of the being achieving this state. All desires fade away as the power inside of the man surges to new and profound levels. Now, this energy is free and unconditional. Representing the unconditional love of God. The love of God where all things are possible. Infinite possibilities expanding in the consciousness of man as he enters the realm of forever while in this fast.
Now, he attains the greatest power and everything he chooses to create comes from unconditional love, free energy, states without conditions. He is detached, free, and liberated from the needs of this world. All his needs are met as the love of the spirit is scintillating, sparkling, and shining from his soul. He is a man walking without doubts, fears, resistances and weaknesses of any kind while in this fast. The power of the unified field is surging through him and transforming his mind, his body, his heart. He can no longer be the old version of himself, he can no longer walk the same, he can no longer speak in the same manner. His world is altered and his mind opened to ideas, insights, and dreams of the infinite.
As the power within him continues to surge while in this fast and his desires continue dissolving he surrenders to the perfect light within as his body's vibration manifests everything relevant to his life. Everything that his perfect light calls into existence. Unsullied by negative beliefs, unchained from the trauma of his past and unrequited by the spirit of damnation. This man is so in tuned to the light within. He trust all that is manifested by the spirit within. He need not ask for anything. He need not go anywhere. He need not to become anyone. For he is the one from which all things flow. His perfect, super, blissful divine nature that he has become. The Superman of God.
While in this fast the super self attains powers and abilities unbeknownst to the people and the world around him. His intelligence is magnified as his mind and brain assumes the brightness of consciousness. Glowing and sparkling from his mind, his thoughts, his ideas as they take on a new and higher quality exhibiting the mind of God. Telepathy, prophecy, and imagination swirling in his mind and brain intertwining with the dreams of reality. His ability to sense the thoughts of others and predict behavior and circumstances as his dreams of reality become more synchronized with his mind. The power of the mind of man expands beyond time and space into the reaches of the infinite present moment where all things are here and now.
He is becoming the god of reality, the arbiter of worlds, the super self that bends time and space by his will alone while in this fast. Reach this state of the super consciousness of super manifestation of super realization and the mountain does not need to move. The mountain was never there. The mountain fades away like all dreams that are not supported by the super self. Fading away like the dream it was in the dreams of illusions.
While in this fast as you become the enlightened one, all demons, monsters, darkness, enemies, and warlocks of many different kinds in the shadow dimensions tread carefully around the being who is carrying the light of the holy one. They know who you are. They know what you are. God walking in man. Light effecting the state of the darkness. And unaffected by manipulation, unfazed by their attempts of fear, and unmoved by their promises of riches. You are steady in body. You are convicted in mind. Absolute in peace. You are the one calming the still waters of the storm. You are the blessed.
Seeing the future and the past all in the present moment as he becomes something greater than before. The prophecy of the future and the events of the past all present in his conscious awareness. Making changes to thoughts, ideas, and events as the man becomes God in the flesh transcending time and space as his new vibration transforms and changes reality around him. As he becomes the beacon of transformation of darkness into light, matter into energy, weakness into strength. From nothing to everything.
Anything he dares to create comes from the unconditional love from within him as a dream of excitement, a fantastic idea, a playful project while disassociated from expectations and needs of any kind. It is born from no expectations.
While in this fast he walks with a light body, an expanded mind, a golden heart, a perfect light that is affecting everyone and everything around him in the space of reality his presence commands. And those that need to be healed are brought before him to touch the garments of his vibration as he heals, repairs, and regenerates the lost souls in the dream. By connecting to the god within them to connect to the god within him. Creating a synchronization and a pairing of the god force that no darkness can stop. Healing by his presence alone. His vibration, consciousness, spirit opening the hearts and raising the minds of people in his world. Quickening their vibration, discovering themselves, and facing their fears as they overcome the shadows of themselves and then their vibration effecting the people in their lives, and them in theirs, and theirs in theirs and so on and so on, throughout time and space. The notion of be the change you want to see in the world is more tangible than ever.
And the souls of the lost are liberated from the consciousness of darkness to the realms of light. While in this fast you have become the destroyer and liberator, the alpha and omega, the one who will liberate mankind and the judgment of the oppressors by the power emanating and vibrating from within you. You, the power of God, the super self. That Superman of God.
While in this fast his mind is cleared and his body is enlightened by the spark of divinity as his dreams become prophetic entering a world beyond time and space. His consciousness communicating with the super consciousness of multidimensional realms as he access the unconscious parts of himself. Becoming conscious of the unconscious, aware of the unexplored, and knowing of the unknown as he taps into the divine nature within. His dreams, experiences, lives in the other dimensional realms linking, connecting, synchronizing as he downloads new profound information about himself and his dream reality.
Growing his intelligence, his knowledge becoming limitless as he downloads new, higher and greater information than before. Changing his perception of the world and living with a new sense of purpose, a new sense of reality, a sense of being greater than ever. He is the mind of God expanding in the dream. Expanding into the greater self, his greatest self, his most amazing self, magnificent self. His mind expanded and intelligence magnified. He is becoming unlimited. By the unlimited One.
And there he feels his divine nature. His eternal nature. In the foreverness. Communing and basking in the glow of the light. The glow of All That Is. He knows who he is. He knows what he is.
While in this fast you are the super self, you are the being of light, you are the one commanding the dreams within the dream. While in this fast, dare to reach the super consciousness. Dare to become unlimited. Dare to be the Superman of God. You are The One.
​
submitted by EvilZero86 to DryFastingSuper [link] [comments]


2024.06.01 14:24 Money_Elephant399 Home for another 20ish days.

I have 20 days of ‘freedom’ per se. I've been doing a lot lately, learning Python, trying my hands at gauche paints, trying to get out of the reading rut that I've been in for what seems like forever, and swimming! But nothing feels..fulfilling. I have chronic anxiety, I struggle with body image issues a lot, and lately my sensory issues have been getting worse. Haven't slept properly in days, and haven't had a ‘happy’ day in weeks. Is there anything that helped you..idk, heal? Something that snapped you back into reality- which seems better than what's going on in my head. I usually go to baking as my feel-good activity but it is too hot to feel good near an oven. Please help :)
submitted by Money_Elephant399 to TwoXIndia [link] [comments]


2024.06.01 14:24 Jonasbru3m TensorFlow Model Only Predicts 2 Classes out of 475

Hello Reddit Community,
For my Bachelor Thesis im currently trying to train my first ever model with tensorflow, but I'm encountering a strange issue where my model only predicts 2 classes out of the 475 possible classes. The model was trained on a HPC with 304 Nvidia A100 and 352 Nvidia A40 GPGPUs in 82 nodes.
Thats my training script:
 import os import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import EfficientNetB7 from tensorflow.keras import layers, models from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard import tensorflow_addons as tfa import logging import json # Setup logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Check if GPUs are available gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) tf.config.set_visible_devices(gpus, 'GPU') logging.info(f"Using {len(gpus)} GPUs.") except RuntimeError as e: logging.error(e) else: logging.error("No GPUs found. Check your device configuration.") # Data directory data_dir = "/app/FOOD475/" # Image dimensions and batch size img_height, img_width = 600, 600 batch_size = 64 # Data preprocessing and augmentation train_datagen = ImageDataGenerator( rescale=1./255, rotation_range=40, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode='nearest', validation_split=0.25 ) # Load and preprocess images train_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='training' ) validation_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='validation' ) # Model creation function def create_model(input_shape, num_classes): base_model = EfficientNetB7(include_top=False, input_shape=input_shape, weights='imagenet') base_model.trainable = True inputs = layers.Input(shape=input_shape) x = base_model(inputs, training=True) x = layers.GlobalAveragePooling2D()(x) outputs = layers.Dense(num_classes, activation='softmax')(x) model = models.Model(inputs, outputs) return model def find_latest_saved_model(checkpoint_dir): logging.info(f"Looking in checkpoint directory: {checkpoint_dir}") if not os.path.exists(checkpoint_dir): logging.error(f"Checkpoint directory does not exist: {checkpoint_dir}") return None, 0 subdirs = [os.path.join(checkpoint_dir, d) for d in os.listdir(checkpoint_dir) if os.path.isdir(os.path.join(checkpoint_dir, d))] if not subdirs: logging.info("No subdirectories found for checkpoints.") return None, 0 latest_subdir = max(subdirs, key=lambda x: int(os.path.basename(x))) latest_epoch = int(os.path.basename(latest_subdir)) logging.info(f"Latest model directory: {latest_subdir}, Epoch: {latest_epoch}") if os.path.exists(os.path.join(latest_subdir, 'saved_model.pb')): return latest_subdir, latest_epoch else: logging.info("No saved_model.pb found in the latest directory.") return None, 0 # Mirrored strategy for multi-GPU training strategy = tf.distribute.MirroredStrategy() with strategy.scope(): saved_model_dir = 'model_training' checkpoint_dir = os.path.join(saved_model_dir, 'checkpoints') latest_saved_model, latest_epoch = find_latest_saved_model(checkpoint_dir) if latest_saved_model: logging.info(f"Loading model from {latest_saved_model}") model = tf.keras.models.load_model(latest_saved_model) else: logging.info("No saved model found. Creating a new model.") model = create_model((img_height, img_width, 3), len(train_generator.class_indices)) if not os.path.exists(saved_model_dir): os.makedirs(saved_model_dir) summary_path = os.path.join(saved_model_dir, 'model_summary.txt') with open(summary_path, 'w') as f: model.summary(print_fn=lambda x: f.write(x + '\n')) logging.info(f"Model summary saved to {summary_path}") optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002) model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy', tf.keras.metrics.TopKCategoricalAccuracy(k=5), tfa.metrics.F1Score(num_classes=len(train_generator.class_indices), average='macro')]) # Custom Callback for Saving the Best Model in SavedModel format class SaveBestModelTF(tf.keras.callbacks.Callback): def __init__(self, monitor='val_accuracy', saved_model_dir='model_training'): super(SaveBestModelTF, self).__init__() self.monitor = monitor self.saved_model_dir = saved_model_dir def on_epoch_end(self, epoch, logs=None): current = logs.get(self.monitor) if current is None: logging.warning(f"Monitor '{self.monitor}' for saving the model is not available in logs.") return logging.info(f"Epoch {epoch + 1}: saving model to {self.saved_model_dir}/checkpoints/{epoch + 1}") epoch_path = os.path.join(self.saved_model_dir, 'checkpoints', str(epoch + 1)) if not os.path.exists(epoch_path): os.makedirs(epoch_path) self.model.save(epoch_path, save_format='tf') # Callbacks for monitoring progress tensorboard_cb = TensorBoard(log_dir='./logs') # Save class indices to a JSON file class_indices_path = 'model_training/class_indices.json' if not os.path.exists(os.path.dirname(class_indices_path)): os.makedirs(os.path.dirname(class_indices_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(class_indices_path)} created.") with open(class_indices_path, 'w') as file: json.dump(train_generator.class_indices, file) logging.info(f"Class indices saved to {class_indices_path}") # Model training total_epochs = 7 model.fit( train_generator, initial_epoch=latest_epoch, # Start from the next epoch epochs=total_epochs, validation_data=validation_generator, callbacks=[SaveBestModelTF(saved_model_dir=saved_model_dir), tensorboard_cb] ) # Evaluate the model eval_result = model.evaluate(validation_generator) logging.info(f'Validation Loss: {eval_result[0]}, Validation Accuracy: {eval_result[1]}') # Save the final model as a SavedModel format (including .pb files) model.save('model_training/finished_model') logging.info("Finished model saved in SavedModel format at 'model_training/finished_model'") # Convert to TensorFlow Lite converter = tf.lite.TFLiteConverter.from_saved_model('model_training/finished_model') tflite_model = converter.convert() tflite_path = 'model_training/lite_model/trained_model_lite.tflite' if not os.path.exists(os.path.dirname(tflite_path)): os.makedirs(os.path.dirname(tflite_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(tflite_path)} created.") with open(tflite_path, 'wb') as f: f.write(tflite_model) logging.info(f"Model converted and saved as {tflite_path}") 
During training i got following output:
Found 182235 images belonging to 475 classes. Found 60544 images belonging to 475 classes. Epoch 1/7 2848/2848 [==============================] - 11914s 4s/step - loss: 1.7624 - accuracy: 0.5931 - top_k_categorical_accuracy: 0.8152 - f1_score: 0.4739 - val_loss: 1.1666 - val_accuracy: 0.7043 - val_top_k_categorical_accuracy: 0.9013 - val_f1_score: 0.6053 Epoch 2/7 2848/2848 [==============================] - 11096s 4s/step - loss: 0.8293 - accuracy: 0.7788 - top_k_categorical_accuracy: 0.9435 - f1_score: 0.7094 - val_loss: 0.9409 - val_accuracy: 0.7533 - val_top_k_categorical_accuracy: 0.9277 - val_f1_score: 0.6818 Epoch 3/7 2848/2848 [==============================] - 11123s 4s/step - loss: 0.6247 - accuracy: 0.8274 - top_k_categorical_accuracy: 0.9632 - f1_score: 0.7760 - val_loss: 0.8422 - val_accuracy: 0.7761 - val_top_k_categorical_accuracy: 0.9386 - val_f1_score: 0.7080 Epoch 4/7 2848/2848 [==============================] - 11101s 4s/step - loss: 0.5070 - accuracy: 0.8562 - top_k_categorical_accuracy: 0.9743 - f1_score: 0.8165 - val_loss: 0.8002 - val_accuracy: 0.7885 - val_top_k_categorical_accuracy: 0.9428 - val_f1_score: 0.7249 Epoch 5/7 2848/2848 [==============================] - 11079s 4s/step - loss: 0.4261 - accuracy: 0.8766 - top_k_categorical_accuracy: 0.9814 - f1_score: 0.8445 - val_loss: 0.7757 - val_accuracy: 0.7940 - val_top_k_categorical_accuracy: 0.9458 - val_f1_score: 0.7404 Epoch 6/7 2848/2848 [==============================] - 11100s 4s/step - loss: 0.3641 - accuracy: 0.8932 - top_k_categorical_accuracy: 0.9856 - f1_score: 0.8657 - val_loss: 0.7639 - val_accuracy: 0.8003 - val_top_k_categorical_accuracy: 0.9472 - val_f1_score: 0.7432 Epoch 7/7 2848/2848 [==============================] - 11129s 4s/step - loss: 0.3142 - accuracy: 0.9068 - top_k_categorical_accuracy: 0.9889 - f1_score: 0.8838 - val_loss: 0.7701 - val_accuracy: 0.8014 - val_top_k_categorical_accuracy: 0.9470 - val_f1_score: 0.7474 946/946 [==============================] - 2671s 3s/step - loss: 0.7682 - accuracy: 0.8008 - top_k_categorical_accuracy: 0.9470 - f1_score: 0.7456 
And when I try to load the model and make a prediction with this code:
class own: def __init__(self): if not os.path.exists("models/own"): raise FileNotFoundError(f"Model path models/own does not exist") try: self.model = tf.keras.models.load_model("models/own", custom_objects={'F1Score': F1Score}) except Exception as e: print(f"Error loading model: {e}") raise if not os.path.exists("models/own/class_indices.json"): raise FileNotFoundError(f"Class indices path models/own/class_indices.json does not exist") with open("models/own/class_indices.json", 'r') as file: self.class_indices = json.load(file) self.index_to_class = {v: k for k, v in self.class_indices.items()} def classify(self, img_path): if not os.path.exists(img_path): raise FileNotFoundError(f"Image path {img_path} does not exist") # Load and preprocess the image img = tf.keras.preprocessing.image.load_img(img_path, target_size=(600, 600)) img_array = tf.keras.preprocessing.image.img_to_array(img) img_array = np.expand_dims(img_array, axis=0) img_array /= 255.0 # Make prediction predictions = self.model.predict(img_array) print("Raw predictions:", predictions) top_index = np.argmax(predictions[0]) top_class = self.index_to_class[top_index] print(f"Top class: {top_class}, Probability: {predictions[0][top_index]}") top_n = 5 top_indices = np.argsort(predictions[0])[-top_n:][::-1] for idx in top_indices: print(f"Class: {self.index_to_class[idx]}, Probability: {predictions[0][idx]}") return top_class 
it always either predicts Steak or Omelette:
2024-06-01 14:17:27.571776: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead. C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\tfa_eol_msg.py:23: UserWarning: TensorFlow Addons (TFA) has ended development and introduction of new features. TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024. Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). For more information see: warnings.warn( C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\ensure_tf_install.py:53: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.12.0 and strictly below 2.15.0 (nightly versions are not supported). The versions of TensorFlow you are currently using is 2.15.0 and is not supported. Some things might work, some things might not. If you were to encounter a bug, do not file an issue. If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version. You can find the compatibility matrix in TensorFlow Addon's readme: warnings.warn( WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\saving\legacy\saved_model\load.py:107: The name tf.gfile.Exists is deprecated. Please use tf.io.gfile.exists instead. 2024-06-01 14:17:31.363666: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\engine\functional.py:156: The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\layers\normalization\batch_normalization.py:979: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead. 1/1 [==============================] - 4s 4s/step Raw predictions: [[4.23421043e-05 1.45377373e-06 1.09034730e-02 1.19525917e-04 4.45407240e-05 5.72818244e-05 5.68609731e-03 5.15926695e-05 1.89958355e-05 1.39491487e-04 3.20717366e-03 9.63417915e-06 1.22947793e-03 4.01171012e-04 3.64649204e-05 1.75396308e-05 3.09416023e-03 7.56465085e-03 2.89075997e-05 3.90331191e-03 2.16231216e-03 4.18351328e-06 5.89632022e-04 9.40740295e-03 6.80321036e-03 2.32697069e-03 4.23964392e-03 1.56047070e-04 2.14435873e-04 6.95710623e-05 1.38103365e-04 1.78470847e-03 3.75193194e-03 5.94434096e-03 5.69255608e-05 7.57165905e-03 1.52613886e-03 9.48755944e-04 8.21925176e-04 3.18029453e-03 3.89393512e-03 8.41296278e-05 8.34997976e-04 3.14124190e-04 6.81638776e-04 1.10320523e-02 1.10815199e-04 6.18589204e-03 2.17406079e-02 3.72037102e-05 1.65579877e-05 1.30886221e-02 1.01435784e-04 2.13157946e-05 1.25499619e-05 8.94762017e-03 4.36880719e-03 4.78018774e-03 8.53170827e-03 1.45823974e-02 1.05571962e-05 1.12631078e-05 5.09415939e-03 8.12840741e-03 1.48212257e-05 1.52864438e-02 9.66716034e-05 2.25000476e-04 3.60531732e-04 9.28066402e-06 8.15156789e-04 1.09069003e-02 3.43796797e-04 2.53324561e-05 7.89516326e-03 1.44943051e-05 4.06841224e-04 1.67445414e-05 3.78527766e-05 1.80476491e-04 3.33699776e-04 4.13847056e-06 3.32273915e-03 6.51864940e-03 7.48403618e-05 2.68448726e-04 1.54245936e-03 2.95383972e-03 2.26996126e-05 3.64100002e-03 2.81597768e-05 3.11967051e-05 1.48438021e-05 8.46863433e-04 4.05767525e-04 1.75380992e-04 4.76581818e-06 5.42160356e-04 2.19287374e-03 1.18714366e-02 1.41884899e-04 8.76697595e-06 3.85931274e-03 4.37544841e-05 4.01919424e-05 3.87528981e-03 3.88057524e-05 2.69062322e-04 4.46968805e-03 1.17368818e-05 3.70194939e-05 1.55831876e-04 1.63894765e-05 2.38729117e-04 1.19046052e-03 2.12675819e-04 1.08185853e-03 3.01667496e-05 6.18575094e-03 3.91955400e-05 1.40065713e-05 3.02084809e-04 6.46927813e-03 3.37069832e-05 5.15250103e-05 2.31142567e-05 2.20274273e-03 3.17445702e-05 1.04452763e-02 6.80019803e-05 7.81101780e-03 1.23853814e-02 1.04819983e-02 3.20679283e-05 6.71340758e-03 6.94293885e-06 1.98310101e-03 5.29599565e-05 9.02036484e-03 4.57535089e-06 1.93145883e-03 4.06190008e-03 8.42716638e-03 1.50314684e-03 8.58115556e-04 1.22383237e-03 8.49474862e-04 5.48258470e-03 6.09953167e-05 1.57669128e-03 5.43692382e-03 4.88058169e-04 6.75312986e-05 3.43937165e-04 1.93276245e-03 4.06867871e-03 5.20323374e-05 7.78318281e-05 1.93508764e-04 1.14409677e-05 2.21324177e-03 1.90052821e-03 8.52691382e-03 2.43102224e-03 2.88419239e-03 2.53974522e-05 9.51182563e-04 2.32981285e-03 9.86064842e-05 4.14316915e-03 1.66544644e-03 1.02754391e-04 3.95776224e-05 3.02393187e-06 1.32082617e-02 4.14707232e-04 3.40229672e-05 4.81802830e-03 1.90598912e-05 4.08358377e-04 5.95443300e-04 1.22634810e-04 5.74091624e-04 8.57623760e-03 2.60962266e-03 2.95263715e-03 1.58088005e-05 1.64122172e-02 2.09987498e-04 2.36775051e-03 3.00696083e-05 3.46693669e-05 1.16249910e-04 6.94001559e-03 1.58400853e-05 1.95188422e-05 2.19169408e-04 3.09433235e-04 5.44128183e-04 6.35302160e-04 7.07127433e-03 1.19772732e-04 5.37439200e-06 1.91133395e-02 1.27979312e-02 3.89739592e-03 1.97048103e-05 2.29625002e-05 2.21050854e-04 1.92064399e-04 1.20139657e-05 3.20516920e-05 4.26828819e-06 3.64828011e-05 7.55213068e-06 2.67963973e-03 3.17923805e-05 6.19895945e-05 3.99544797e-06 2.68664648e-04 1.83274597e-02 8.71072552e-05 1.38439747e-04 4.96710254e-06 3.56023484e-05 1.34899991e-03 2.05766381e-04 3.96062108e-03 5.61600551e-03 5.31910664e-05 6.77773132e-05 1.36139952e-02 7.41477634e-05 1.63904135e-03 4.74587978e-06 1.45082246e-04 2.09337009e-06 8.13181920e-04 3.63194500e-04 6.46722084e-03 5.02364383e-05 6.90550078e-05 6.36972545e-05 2.09673337e-04 1.79036579e-05 2.36021675e-04 6.37291942e-06 5.70875318e-06 2.56235455e-03 2.72009202e-04 3.77103061e-05 5.63449021e-06 2.25979857e-05 2.61697169e-05 3.42375762e-03 1.04161156e-02 2.22223607e-05 6.27681802e-05 1.88465419e-04 2.82149922e-05 4.01149562e-04 1.31122259e-04 5.97863036e-05 2.41098423e-05 7.71318519e-05 3.57087993e-04 3.41462255e-05 1.01930054e-04 5.23206063e-06 2.95026781e-04 7.02897159e-05 3.99115682e-02 1.89455808e-03 1.74146010e-06 1.14775894e-05 7.84916210e-06 1.93041191e-03 2.37918808e-03 3.49449110e-03 6.98623667e-03 7.64393993e-03 4.12582303e-05 1.24030013e-03 1.72785169e-03 7.18316660e-05 5.17749111e-04 7.84919783e-03 1.04525541e-04 9.83856899e-06 8.77521088e-05 1.68125369e-02 4.09213862e-05 1.09552668e-04 2.54421811e-05 4.65482954e-05 6.95294410e-04 6.72869501e-05 2.40904570e-04 2.15112406e-04 3.85226776e-05 2.51369456e-05 4.68338234e-03 1.26862462e-04 9.00995801e-04 4.16984549e-05 7.36891707e-06 1.51534463e-04 1.48332631e-03 4.95935837e-03 1.91499032e-02 3.01804044e-04 6.28613270e-05 4.78365598e-03 8.38827982e-05 1.70516931e-02 1.52653758e-03 5.85798814e-04 3.11521399e-05 2.11968741e-04 7.41351105e-05 1.40834545e-05 8.93215940e-04 1.45371505e-05 4.96711982e-05 4.11317131e-04 8.89070239e-03 5.06997202e-03 3.08362325e-03 2.77415646e-04 3.75299685e-04 1.19906381e-05 1.50029315e-03 1.14443043e-04 2.52026439e-05 9.22407198e-04 3.51146841e-03 1.11564566e-06 1.36691102e-04 3.53032886e-03 2.15746608e-04 8.79282816e-05 4.36248304e-03 1.77966576e-04 1.47887832e-03 6.94399816e-04 8.03673174e-04 5.23004041e-04 3.90421192e-04 1.06344873e-03 3.55399796e-04 6.01265463e-04 1.55850008e-04 1.33491016e-03 1.09734829e-04 4.38019342e-04 2.42487862e-04 6.84730615e-03 1.02040754e-03 1.07652310e-03 3.51822848e-04 9.20735547e-05 7.50967592e-04 1.44127226e-02 3.58455327e-05 5.16555374e-05 1.31370616e-03 9.02966480e-04 1.24254671e-03 5.20300702e-04 8.57163919e-04 3.66344648e-05 2.01024144e-04 6.52487564e-04 5.93215809e-04 5.76604251e-03 6.19325438e-04 1.16480421e-03 2.37531040e-05 2.50119111e-03 7.08868974e-05 5.99786472e-05 2.55976247e-05 4.62695534e-05 4.24469297e-04 6.20667648e-04 4.15926515e-05 7.03983005e-06 8.77018738e-06 5.21141301e-05 2.11411956e-04 7.74205779e-04 5.31276630e-04 6.44316664e-04 4.07212786e-03 2.68336060e-03 1.74210854e-05 3.76385942e-05 6.74255705e-03 4.46323538e-05 2.76757801e-05 2.56290223e-04 1.22213329e-04 1.22734054e-03 7.73016480e-04 1.11903930e-02 3.16570923e-02 2.75775470e-04 5.73344238e-04 2.86890985e-03 1.10085262e-03 1.35615155e-05 2.66479654e-03 1.99418981e-03 4.31017601e-04 9.68350447e-04 3.51598108e-04 8.54862970e-04 3.52715979e-05 1.46333405e-04 5.10955288e-05 1.48639630e-03 1.80458324e-03 7.51840998e-05 1.13529910e-04 3.89828119e-06 8.74532212e-04 1.12358983e-04 3.93593837e-05 6.01037289e-04 2.06997487e-04 3.94766452e-03 1.09549124e-04 2.11403880e-04 6.95336203e-04 5.99777419e-03 5.45272342e-05 2.56420486e-03 2.20299728e-04 4.23851707e-05 6.69996080e-04 2.66609713e-04 1.55276459e-04 2.75739990e-02 3.43240798e-03 2.68303775e-05 1.52821158e-04 9.82575657e-05 4.00313947e-05 6.07266993e-05 5.28094570e-05 1.02948405e-04 6.20577412e-05 2.12161940e-05 2.99842539e-03 1.17558768e-04 1.58015324e-03 3.30074807e-04 1.19093776e-04 2.52985101e-05 1.59350988e-02 4.89539379e-05 1.05491054e-05 1.09012712e-04 2.97089737e-05 7.28885690e-03 1.87386977e-05 1.85028894e-05 5.79945299e-05 1.54079917e-05 9.85169099e-05 1.05076749e-03 7.55816349e-04 2.62255053e-05 1.18091421e-05 2.95209320e-05]] Top class: omelette, Probability: 0.03991156816482544 Class: omelette, Probability: 0.03991156816482544 Class: steak, Probability: 0.03165709227323532 Class: tacos, Probability: 0.027573999017477036 Class: breakfast_burrito, Probability: 0.021740607917308807 Class: pulled_pork_sandwich, Probability: 0.01914990320801735 (own): omelette - 3.66shttps://github.com/tensorflow/addons/issues/2807https://github.com/tensorflow/addons 
Help would be appreciated because im slowly losing my mind :(,
Jonas
submitted by Jonasbru3m to learnmachinelearning [link] [comments]


2024.06.01 14:24 NothingHaunting7482 How do I help my mom struggling who is very depressed with body image / being over weight / menopause?

My mom has always struggled with body image issues and dieting her whole life.. she's never been thin but she's beautiful and is always told that - she has a face identical to mine and we're often called sisters.
For 22 years my dad controlled her ever move, she wasnt allowed to wear makeup, get her hair done.. he bought her clothes for the most part etc. He wanted her home cooking and cleaning. This was damaging of course.
For 10 years now she's been with the most relaxed man, doesn't even care much about cleaning, loves to cook himself. Wants her to have and do everything she loves ...but she can't / won't.
With menopause has come some serious weight gain and she's very depressed and angry.
She ruminates about the same things. How the world is fat phobic (I honestly think she is).. how she can't do anything (swimming, walking, shopping, gardening, going out on the town) until the weight is gone.. and never stops drilling me on how "calories in calories out" is THE BIGGEST LIE of them all.
I just try to refocus the conversation, plan fun outings for her.. but it literally haunts everything.. she's either complaining or not listening to anything but her thoughts.
I've tried sharing fashion influencers who have bodies like hers. She does listen to this one menopausal podcast that discusses body image and mindset...
I've gently suggested therapy, she says shes fears therapy because "in her day" therapy was for people with serious problems.. yet she knows me, my husband and my step sister are in therapy and see benefit.
I've found a few natural or medical doctors that focus on menopause and she refuses saying they are just going to tell her to eat less and move more.
This has been going on for 2 years and it's hurting our relationship.
submitted by NothingHaunting7482 to TwoXChromosomes [link] [comments]


2024.06.01 14:23 Jonasbru3m TensorFlow Model Only Predicts 2 Classes out of 475

Hello Reddit Community,
For my Bachelor Thesis im currently trying to train my first ever model with tensorflow, but I'm encountering a strange issue where my model only predicts 2 classes out of the 475 possible classes. The model was trained on a HPC with 304 Nvidia A100 and 352 Nvidia A40 GPGPUs in 82 nodes.
Thats my training script:
 import os import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import EfficientNetB7 from tensorflow.keras import layers, models from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard import tensorflow_addons as tfa import logging import json # Setup logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Check if GPUs are available gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) tf.config.set_visible_devices(gpus, 'GPU') logging.info(f"Using {len(gpus)} GPUs.") except RuntimeError as e: logging.error(e) else: logging.error("No GPUs found. Check your device configuration.") # Data directory data_dir = "/app/FOOD475/" # Image dimensions and batch size img_height, img_width = 600, 600 batch_size = 64 # Data preprocessing and augmentation train_datagen = ImageDataGenerator( rescale=1./255, rotation_range=40, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode='nearest', validation_split=0.25 ) # Load and preprocess images train_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='training' ) validation_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='validation' ) # Model creation function def create_model(input_shape, num_classes): base_model = EfficientNetB7(include_top=False, input_shape=input_shape, weights='imagenet') base_model.trainable = True inputs = layers.Input(shape=input_shape) x = base_model(inputs, training=True) x = layers.GlobalAveragePooling2D()(x) outputs = layers.Dense(num_classes, activation='softmax')(x) model = models.Model(inputs, outputs) return model def find_latest_saved_model(checkpoint_dir): logging.info(f"Looking in checkpoint directory: {checkpoint_dir}") if not os.path.exists(checkpoint_dir): logging.error(f"Checkpoint directory does not exist: {checkpoint_dir}") return None, 0 subdirs = [os.path.join(checkpoint_dir, d) for d in os.listdir(checkpoint_dir) if os.path.isdir(os.path.join(checkpoint_dir, d))] if not subdirs: logging.info("No subdirectories found for checkpoints.") return None, 0 latest_subdir = max(subdirs, key=lambda x: int(os.path.basename(x))) latest_epoch = int(os.path.basename(latest_subdir)) logging.info(f"Latest model directory: {latest_subdir}, Epoch: {latest_epoch}") if os.path.exists(os.path.join(latest_subdir, 'saved_model.pb')): return latest_subdir, latest_epoch else: logging.info("No saved_model.pb found in the latest directory.") return None, 0 # Mirrored strategy for multi-GPU training strategy = tf.distribute.MirroredStrategy() with strategy.scope(): saved_model_dir = 'model_training' checkpoint_dir = os.path.join(saved_model_dir, 'checkpoints') latest_saved_model, latest_epoch = find_latest_saved_model(checkpoint_dir) if latest_saved_model: logging.info(f"Loading model from {latest_saved_model}") model = tf.keras.models.load_model(latest_saved_model) else: logging.info("No saved model found. Creating a new model.") model = create_model((img_height, img_width, 3), len(train_generator.class_indices)) if not os.path.exists(saved_model_dir): os.makedirs(saved_model_dir) summary_path = os.path.join(saved_model_dir, 'model_summary.txt') with open(summary_path, 'w') as f: model.summary(print_fn=lambda x: f.write(x + '\n')) logging.info(f"Model summary saved to {summary_path}") optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002) model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy', tf.keras.metrics.TopKCategoricalAccuracy(k=5), tfa.metrics.F1Score(num_classes=len(train_generator.class_indices), average='macro')]) # Custom Callback for Saving the Best Model in SavedModel format class SaveBestModelTF(tf.keras.callbacks.Callback): def __init__(self, monitor='val_accuracy', saved_model_dir='model_training'): super(SaveBestModelTF, self).__init__() self.monitor = monitor self.saved_model_dir = saved_model_dir def on_epoch_end(self, epoch, logs=None): current = logs.get(self.monitor) if current is None: logging.warning(f"Monitor '{self.monitor}' for saving the model is not available in logs.") return logging.info(f"Epoch {epoch + 1}: saving model to {self.saved_model_dir}/checkpoints/{epoch + 1}") epoch_path = os.path.join(self.saved_model_dir, 'checkpoints', str(epoch + 1)) if not os.path.exists(epoch_path): os.makedirs(epoch_path) self.model.save(epoch_path, save_format='tf') # Callbacks for monitoring progress tensorboard_cb = TensorBoard(log_dir='./logs') # Save class indices to a JSON file class_indices_path = 'model_training/class_indices.json' if not os.path.exists(os.path.dirname(class_indices_path)): os.makedirs(os.path.dirname(class_indices_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(class_indices_path)} created.") with open(class_indices_path, 'w') as file: json.dump(train_generator.class_indices, file) logging.info(f"Class indices saved to {class_indices_path}") # Model training total_epochs = 7 model.fit( train_generator, initial_epoch=latest_epoch, # Start from the next epoch epochs=total_epochs, validation_data=validation_generator, callbacks=[SaveBestModelTF(saved_model_dir=saved_model_dir), tensorboard_cb] ) # Evaluate the model eval_result = model.evaluate(validation_generator) logging.info(f'Validation Loss: {eval_result[0]}, Validation Accuracy: {eval_result[1]}') # Save the final model as a SavedModel format (including .pb files) model.save('model_training/finished_model') logging.info("Finished model saved in SavedModel format at 'model_training/finished_model'") # Convert to TensorFlow Lite converter = tf.lite.TFLiteConverter.from_saved_model('model_training/finished_model') tflite_model = converter.convert() tflite_path = 'model_training/lite_model/trained_model_lite.tflite' if not os.path.exists(os.path.dirname(tflite_path)): os.makedirs(os.path.dirname(tflite_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(tflite_path)} created.") with open(tflite_path, 'wb') as f: f.write(tflite_model) logging.info(f"Model converted and saved as {tflite_path}") 
During training i got following output:
Found 182235 images belonging to 475 classes. Found 60544 images belonging to 475 classes. Epoch 1/7 2848/2848 [==============================] - 11914s 4s/step - loss: 1.7624 - accuracy: 0.5931 - top_k_categorical_accuracy: 0.8152 - f1_score: 0.4739 - val_loss: 1.1666 - val_accuracy: 0.7043 - val_top_k_categorical_accuracy: 0.9013 - val_f1_score: 0.6053 Epoch 2/7 2848/2848 [==============================] - 11096s 4s/step - loss: 0.8293 - accuracy: 0.7788 - top_k_categorical_accuracy: 0.9435 - f1_score: 0.7094 - val_loss: 0.9409 - val_accuracy: 0.7533 - val_top_k_categorical_accuracy: 0.9277 - val_f1_score: 0.6818 Epoch 3/7 2848/2848 [==============================] - 11123s 4s/step - loss: 0.6247 - accuracy: 0.8274 - top_k_categorical_accuracy: 0.9632 - f1_score: 0.7760 - val_loss: 0.8422 - val_accuracy: 0.7761 - val_top_k_categorical_accuracy: 0.9386 - val_f1_score: 0.7080 Epoch 4/7 2848/2848 [==============================] - 11101s 4s/step - loss: 0.5070 - accuracy: 0.8562 - top_k_categorical_accuracy: 0.9743 - f1_score: 0.8165 - val_loss: 0.8002 - val_accuracy: 0.7885 - val_top_k_categorical_accuracy: 0.9428 - val_f1_score: 0.7249 Epoch 5/7 2848/2848 [==============================] - 11079s 4s/step - loss: 0.4261 - accuracy: 0.8766 - top_k_categorical_accuracy: 0.9814 - f1_score: 0.8445 - val_loss: 0.7757 - val_accuracy: 0.7940 - val_top_k_categorical_accuracy: 0.9458 - val_f1_score: 0.7404 Epoch 6/7 2848/2848 [==============================] - 11100s 4s/step - loss: 0.3641 - accuracy: 0.8932 - top_k_categorical_accuracy: 0.9856 - f1_score: 0.8657 - val_loss: 0.7639 - val_accuracy: 0.8003 - val_top_k_categorical_accuracy: 0.9472 - val_f1_score: 0.7432 Epoch 7/7 2848/2848 [==============================] - 11129s 4s/step - loss: 0.3142 - accuracy: 0.9068 - top_k_categorical_accuracy: 0.9889 - f1_score: 0.8838 - val_loss: 0.7701 - val_accuracy: 0.8014 - val_top_k_categorical_accuracy: 0.9470 - val_f1_score: 0.7474 946/946 [==============================] - 2671s 3s/step - loss: 0.7682 - accuracy: 0.8008 - top_k_categorical_accuracy: 0.9470 - f1_score: 0.7456 
And when I try to load the model and make a prediction with this code:
class own: def __init__(self): if not os.path.exists("models/own"): raise FileNotFoundError(f"Model path models/own does not exist") try: self.model = tf.keras.models.load_model("models/own", custom_objects={'F1Score': F1Score}) except Exception as e: print(f"Error loading model: {e}") raise if not os.path.exists("models/own/class_indices.json"): raise FileNotFoundError(f"Class indices path models/own/class_indices.json does not exist") with open("models/own/class_indices.json", 'r') as file: self.class_indices = json.load(file) self.index_to_class = {v: k for k, v in self.class_indices.items()} def classify(self, img_path): if not os.path.exists(img_path): raise FileNotFoundError(f"Image path {img_path} does not exist") # Load and preprocess the image img = tf.keras.preprocessing.image.load_img(img_path, target_size=(600, 600)) img_array = tf.keras.preprocessing.image.img_to_array(img) img_array = np.expand_dims(img_array, axis=0) img_array /= 255.0 # Make prediction predictions = self.model.predict(img_array) print("Raw predictions:", predictions) top_index = np.argmax(predictions[0]) top_class = self.index_to_class[top_index] print(f"Top class: {top_class}, Probability: {predictions[0][top_index]}") top_n = 5 top_indices = np.argsort(predictions[0])[-top_n:][::-1] for idx in top_indices: print(f"Class: {self.index_to_class[idx]}, Probability: {predictions[0][idx]}") return top_class 
it always either predicts Steak or Omelette:
2024-06-01 14:17:27.571776: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead. C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\tfa_eol_msg.py:23: UserWarning: TensorFlow Addons (TFA) has ended development and introduction of new features. TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024. Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). For more information see: warnings.warn( C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\ensure_tf_install.py:53: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.12.0 and strictly below 2.15.0 (nightly versions are not supported). The versions of TensorFlow you are currently using is 2.15.0 and is not supported. Some things might work, some things might not. If you were to encounter a bug, do not file an issue. If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version. You can find the compatibility matrix in TensorFlow Addon's readme: warnings.warn( WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\saving\legacy\saved_model\load.py:107: The name tf.gfile.Exists is deprecated. Please use tf.io.gfile.exists instead. 2024-06-01 14:17:31.363666: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\engine\functional.py:156: The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\layers\normalization\batch_normalization.py:979: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead. 1/1 [==============================] - 4s 4s/step Raw predictions: [[4.23421043e-05 1.45377373e-06 1.09034730e-02 1.19525917e-04 4.45407240e-05 5.72818244e-05 5.68609731e-03 5.15926695e-05 1.89958355e-05 1.39491487e-04 3.20717366e-03 9.63417915e-06 1.22947793e-03 4.01171012e-04 3.64649204e-05 1.75396308e-05 3.09416023e-03 7.56465085e-03 2.89075997e-05 3.90331191e-03 2.16231216e-03 4.18351328e-06 5.89632022e-04 9.40740295e-03 6.80321036e-03 2.32697069e-03 4.23964392e-03 1.56047070e-04 2.14435873e-04 6.95710623e-05 1.38103365e-04 1.78470847e-03 3.75193194e-03 5.94434096e-03 5.69255608e-05 7.57165905e-03 1.52613886e-03 9.48755944e-04 8.21925176e-04 3.18029453e-03 3.89393512e-03 8.41296278e-05 8.34997976e-04 3.14124190e-04 6.81638776e-04 1.10320523e-02 1.10815199e-04 6.18589204e-03 2.17406079e-02 3.72037102e-05 1.65579877e-05 1.30886221e-02 1.01435784e-04 2.13157946e-05 1.25499619e-05 8.94762017e-03 4.36880719e-03 4.78018774e-03 8.53170827e-03 1.45823974e-02 1.05571962e-05 1.12631078e-05 5.09415939e-03 8.12840741e-03 1.48212257e-05 1.52864438e-02 9.66716034e-05 2.25000476e-04 3.60531732e-04 9.28066402e-06 8.15156789e-04 1.09069003e-02 3.43796797e-04 2.53324561e-05 7.89516326e-03 1.44943051e-05 4.06841224e-04 1.67445414e-05 3.78527766e-05 1.80476491e-04 3.33699776e-04 4.13847056e-06 3.32273915e-03 6.51864940e-03 7.48403618e-05 2.68448726e-04 1.54245936e-03 2.95383972e-03 2.26996126e-05 3.64100002e-03 2.81597768e-05 3.11967051e-05 1.48438021e-05 8.46863433e-04 4.05767525e-04 1.75380992e-04 4.76581818e-06 5.42160356e-04 2.19287374e-03 1.18714366e-02 1.41884899e-04 8.76697595e-06 3.85931274e-03 4.37544841e-05 4.01919424e-05 3.87528981e-03 3.88057524e-05 2.69062322e-04 4.46968805e-03 1.17368818e-05 3.70194939e-05 1.55831876e-04 1.63894765e-05 2.38729117e-04 1.19046052e-03 2.12675819e-04 1.08185853e-03 3.01667496e-05 6.18575094e-03 3.91955400e-05 1.40065713e-05 3.02084809e-04 6.46927813e-03 3.37069832e-05 5.15250103e-05 2.31142567e-05 2.20274273e-03 3.17445702e-05 1.04452763e-02 6.80019803e-05 7.81101780e-03 1.23853814e-02 1.04819983e-02 3.20679283e-05 6.71340758e-03 6.94293885e-06 1.98310101e-03 5.29599565e-05 9.02036484e-03 4.57535089e-06 1.93145883e-03 4.06190008e-03 8.42716638e-03 1.50314684e-03 8.58115556e-04 1.22383237e-03 8.49474862e-04 5.48258470e-03 6.09953167e-05 1.57669128e-03 5.43692382e-03 4.88058169e-04 6.75312986e-05 3.43937165e-04 1.93276245e-03 4.06867871e-03 5.20323374e-05 7.78318281e-05 1.93508764e-04 1.14409677e-05 2.21324177e-03 1.90052821e-03 8.52691382e-03 2.43102224e-03 2.88419239e-03 2.53974522e-05 9.51182563e-04 2.32981285e-03 9.86064842e-05 4.14316915e-03 1.66544644e-03 1.02754391e-04 3.95776224e-05 3.02393187e-06 1.32082617e-02 4.14707232e-04 3.40229672e-05 4.81802830e-03 1.90598912e-05 4.08358377e-04 5.95443300e-04 1.22634810e-04 5.74091624e-04 8.57623760e-03 2.60962266e-03 2.95263715e-03 1.58088005e-05 1.64122172e-02 2.09987498e-04 2.36775051e-03 3.00696083e-05 3.46693669e-05 1.16249910e-04 6.94001559e-03 1.58400853e-05 1.95188422e-05 2.19169408e-04 3.09433235e-04 5.44128183e-04 6.35302160e-04 7.07127433e-03 1.19772732e-04 5.37439200e-06 1.91133395e-02 1.27979312e-02 3.89739592e-03 1.97048103e-05 2.29625002e-05 2.21050854e-04 1.92064399e-04 1.20139657e-05 3.20516920e-05 4.26828819e-06 3.64828011e-05 7.55213068e-06 2.67963973e-03 3.17923805e-05 6.19895945e-05 3.99544797e-06 2.68664648e-04 1.83274597e-02 8.71072552e-05 1.38439747e-04 4.96710254e-06 3.56023484e-05 1.34899991e-03 2.05766381e-04 3.96062108e-03 5.61600551e-03 5.31910664e-05 6.77773132e-05 1.36139952e-02 7.41477634e-05 1.63904135e-03 4.74587978e-06 1.45082246e-04 2.09337009e-06 8.13181920e-04 3.63194500e-04 6.46722084e-03 5.02364383e-05 6.90550078e-05 6.36972545e-05 2.09673337e-04 1.79036579e-05 2.36021675e-04 6.37291942e-06 5.70875318e-06 2.56235455e-03 2.72009202e-04 3.77103061e-05 5.63449021e-06 2.25979857e-05 2.61697169e-05 3.42375762e-03 1.04161156e-02 2.22223607e-05 6.27681802e-05 1.88465419e-04 2.82149922e-05 4.01149562e-04 1.31122259e-04 5.97863036e-05 2.41098423e-05 7.71318519e-05 3.57087993e-04 3.41462255e-05 1.01930054e-04 5.23206063e-06 2.95026781e-04 7.02897159e-05 3.99115682e-02 1.89455808e-03 1.74146010e-06 1.14775894e-05 7.84916210e-06 1.93041191e-03 2.37918808e-03 3.49449110e-03 6.98623667e-03 7.64393993e-03 4.12582303e-05 1.24030013e-03 1.72785169e-03 7.18316660e-05 5.17749111e-04 7.84919783e-03 1.04525541e-04 9.83856899e-06 8.77521088e-05 1.68125369e-02 4.09213862e-05 1.09552668e-04 2.54421811e-05 4.65482954e-05 6.95294410e-04 6.72869501e-05 2.40904570e-04 2.15112406e-04 3.85226776e-05 2.51369456e-05 4.68338234e-03 1.26862462e-04 9.00995801e-04 4.16984549e-05 7.36891707e-06 1.51534463e-04 1.48332631e-03 4.95935837e-03 1.91499032e-02 3.01804044e-04 6.28613270e-05 4.78365598e-03 8.38827982e-05 1.70516931e-02 1.52653758e-03 5.85798814e-04 3.11521399e-05 2.11968741e-04 7.41351105e-05 1.40834545e-05 8.93215940e-04 1.45371505e-05 4.96711982e-05 4.11317131e-04 8.89070239e-03 5.06997202e-03 3.08362325e-03 2.77415646e-04 3.75299685e-04 1.19906381e-05 1.50029315e-03 1.14443043e-04 2.52026439e-05 9.22407198e-04 3.51146841e-03 1.11564566e-06 1.36691102e-04 3.53032886e-03 2.15746608e-04 8.79282816e-05 4.36248304e-03 1.77966576e-04 1.47887832e-03 6.94399816e-04 8.03673174e-04 5.23004041e-04 3.90421192e-04 1.06344873e-03 3.55399796e-04 6.01265463e-04 1.55850008e-04 1.33491016e-03 1.09734829e-04 4.38019342e-04 2.42487862e-04 6.84730615e-03 1.02040754e-03 1.07652310e-03 3.51822848e-04 9.20735547e-05 7.50967592e-04 1.44127226e-02 3.58455327e-05 5.16555374e-05 1.31370616e-03 9.02966480e-04 1.24254671e-03 5.20300702e-04 8.57163919e-04 3.66344648e-05 2.01024144e-04 6.52487564e-04 5.93215809e-04 5.76604251e-03 6.19325438e-04 1.16480421e-03 2.37531040e-05 2.50119111e-03 7.08868974e-05 5.99786472e-05 2.55976247e-05 4.62695534e-05 4.24469297e-04 6.20667648e-04 4.15926515e-05 7.03983005e-06 8.77018738e-06 5.21141301e-05 2.11411956e-04 7.74205779e-04 5.31276630e-04 6.44316664e-04 4.07212786e-03 2.68336060e-03 1.74210854e-05 3.76385942e-05 6.74255705e-03 4.46323538e-05 2.76757801e-05 2.56290223e-04 1.22213329e-04 1.22734054e-03 7.73016480e-04 1.11903930e-02 3.16570923e-02 2.75775470e-04 5.73344238e-04 2.86890985e-03 1.10085262e-03 1.35615155e-05 2.66479654e-03 1.99418981e-03 4.31017601e-04 9.68350447e-04 3.51598108e-04 8.54862970e-04 3.52715979e-05 1.46333405e-04 5.10955288e-05 1.48639630e-03 1.80458324e-03 7.51840998e-05 1.13529910e-04 3.89828119e-06 8.74532212e-04 1.12358983e-04 3.93593837e-05 6.01037289e-04 2.06997487e-04 3.94766452e-03 1.09549124e-04 2.11403880e-04 6.95336203e-04 5.99777419e-03 5.45272342e-05 2.56420486e-03 2.20299728e-04 4.23851707e-05 6.69996080e-04 2.66609713e-04 1.55276459e-04 2.75739990e-02 3.43240798e-03 2.68303775e-05 1.52821158e-04 9.82575657e-05 4.00313947e-05 6.07266993e-05 5.28094570e-05 1.02948405e-04 6.20577412e-05 2.12161940e-05 2.99842539e-03 1.17558768e-04 1.58015324e-03 3.30074807e-04 1.19093776e-04 2.52985101e-05 1.59350988e-02 4.89539379e-05 1.05491054e-05 1.09012712e-04 2.97089737e-05 7.28885690e-03 1.87386977e-05 1.85028894e-05 5.79945299e-05 1.54079917e-05 9.85169099e-05 1.05076749e-03 7.55816349e-04 2.62255053e-05 1.18091421e-05 2.95209320e-05]] Top class: omelette, Probability: 0.03991156816482544 Class: omelette, Probability: 0.03991156816482544 Class: steak, Probability: 0.03165709227323532 Class: tacos, Probability: 0.027573999017477036 Class: breakfast_burrito, Probability: 0.021740607917308807 Class: pulled_pork_sandwich, Probability: 0.01914990320801735 (own): omelette - 3.66shttps://github.com/tensorflow/addons/issues/2807https://github.com/tensorflow/addons 
Help would be appreciated because im slowly losing my mind :(,
Jonas
submitted by Jonasbru3m to deeplearning [link] [comments]


2024.06.01 14:22 Followerbar How to Get Views On Instagram Videos?

How to Get Views On Instagram Videos?
https://preview.redd.it/b32hjexfdy3d1.png?width=727&format=png&auto=webp&s=8f48536bbc359a4ff1748b7e8cacb42290ead50e
1. Create Unique and Shareable Content
Creating unique and shareable content is key to making it on such a visual platform. If you’re making videos, ensure they are always high-quality, engaging, and valuable so people are likelier to like, comment, and share. Be cohesive with the aesthetic of the videos so your feed is consistent and always provides value.
2. Promote IGTV on Other Channels
Cross-promotion will greatly increase brand visibility, so make sure to promote your IGTV on other channels and social media platforms. Such as Facebook, Twitter, TikTok, etc. Some followers are more active on Facebook than on Instagram, and you want to reach everyone, which is what cross-promotion allows you to do. Not to mention, this will encourage people to follow you on all your social media channels.
3. Share on Your Instagram Stories
Instagram Stories have much more reach than IGTV and posts because they are easier to access. Not to mention, followers can view more content in less time than posts on the feed. Sharing your videos on your Instagram Stories will increase your exposure, and that’s how you get more views. To increase IGTV views, create eye-catching stories so viewers are interested enough to tap on them and watch the full video.
Conclusion
All the valuable tips we provided today are tried and true! If you practice them consistently, your views will grow consistently, and so will your business. If your Instagram views are not increasing, you can use our Buy Instagram Views India service to improve them. Being successful on Instagram involves many moving parts, and it’s not something you can accomplish without a marketing strategy. Use these tips to create one and watch your brand explode.
submitted by Followerbar to u/Followerbar [link] [comments]


2024.06.01 14:22 Kenshiro_Kosuke Nijika-chan is my angel.

Nijika is an angel. How she always offers a helping hand to people around her, even a stranger like me, have touched my heart. But fate can be so cruel. Her death was so sudden and tearing my heart out. But even then, I don't think that'll stop my love for Nijika.
It's not that I want to admire a dead body... It's because it's Nijika-chan that I can even love a dead body. After all, loving the living Nijika-chan is a given... Even if she becomes an old woman, even if her face is no longer recognizable, even if her personality becomes rough, what Nijika-chan has given us so far will not disappear or wane. Surely, there is a charm in Nijika-chan that we haven't seen before. The fact that she was involved in an accident in front of us doesn't change, but it didn't end with her death. My love for Nijika-chan won't change because of that. It continues even after death, and her body doesn't disappear. Even after death, a new Nijika-chan begins. If Nijika-chan remains beautiful in my heart, even if her appearance changes, she will still be beautiful. I can love her even if she becomes a corpse. If it's all disfigured and unrecognizable, let's find Nijika-chan's beauty inside. What about her internal organs? I can still find beauty in Nijika-chan's internal organs... even her brain, bones, heart, pancreas, intestines, and undigested contents in her stomach. If it were someone else's, I might vomit, but for Nijika-chan's, I only feel love
Nijika-chan, The Angel of Shimokitazawa. She is still beautiful, even in a rotten state. Even if it's scary, I will look at her and show my love. No matter how messy and unrecognizable she is... because it's Nijika-chan, right? Maybe I should clean it carefully, inspect her parts one by one, and then perform preservation treatment. It might be beautiful in formalin or even in resin. Because it's Nijika-chan, right? Using 60 ml syringes and needles to inject the entire dead body until all parts are completely covered. It just dawns on me that embalming might be the truest form of eternal love. Eating might also be a form of love. I think it's very attractive to have Nijika-chan live on forever inside me. I'd been thinking about that for the past few days but in the end, I decided against that idea... I don't want to part ways with her after all, so let's keep her body as it is.
It's cold tonight so let's sleep in the same futon. Nijika-chan might not like being smelled because she's a girl, but because it's Nijika-chan's, there shouldn't be anything dirty about it. Even if her body deteriorates and her smell becomes stronger, I’m happy just to feel it... If Nijika-chan looks lonely, I will hug her from behind. In the same futon, wrapped in Nijika-chan's scent, I can find happiness in approaching Nijika-chan step by step. Even if I groan in hunger without eating or drinking, it must be a trial to test my love for Nijika-chan... because Nijika-chan has suffered more. I think we can see a landscape beyond that. I think there is a new realm. Gradually, as the days go by, I will become less certain whether I am Nijika-chan or Nijika-chan is me, and I won't know if it's Nijika-chan's scent of my own, and gradually, my body sensations will fade, and I will be conscious of approaching death... but that's okay, all's right with the world... Because Nijika-chan is surely waiting for me beyond that.
Because it's Nijika-chan, beautiful bones and muscle fibers peeking out from the torn arm must be beautiful, the crushed eyeball visible from the shattered face must be beautiful. I'm sure the brain that has come out and the heart, lungs, stomach, intestines, kidneys, liver, spleen, pancreas, and uterus that have become visible are all beautiful and not dirty, and I can love them. Because it's still Nijika-chan.
submitted by Kenshiro_Kosuke to BocchiTheRock [link] [comments]


2024.06.01 14:21 AggravatingCup1068 [Academic repost] Online survey on factors that influence young adults weight (Adults aged between 18-25)

Hi people!! Currently working on my MSc Health psychology thesis and need a final 20 participants!! Would truly appreciate your participation in my 10-15 minute online survey. https://westminsterpsych.az1.qualtrics.com/jfe/form/SV_bgaMEIt9szYOLCC
People cannot take part if they: are diagnosed with an eating disorder, a serious mental health disorder, a health condition that restricts their desired level of physical activity, or who have had major surgery or pregnancy in the past year.
All data is anonymous
submitted by AggravatingCup1068 to SampleSize [link] [comments]


2024.06.01 14:21 Jonasbru3m TensorFlow Model Only Predicts 2 Classes out of 475

Hello Reddit Community,
For my Bachelor Thesis im currently trying to train my first ever model with tensorflow, but I'm encountering a strange issue where my model only predicts 2 classes out of the 475 possible classes. The model was trained on a HPC with 304 Nvidia A100 and 352 Nvidia A40 GPGPUs in 82 nodes.
Thats my training script:
 import os import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import EfficientNetB7 from tensorflow.keras import layers, models from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard import tensorflow_addons as tfa import logging import json # Setup logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Check if GPUs are available gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) tf.config.set_visible_devices(gpus, 'GPU') logging.info(f"Using {len(gpus)} GPUs.") except RuntimeError as e: logging.error(e) else: logging.error("No GPUs found. Check your device configuration.") # Data directory data_dir = "/app/FOOD475/" # Image dimensions and batch size img_height, img_width = 600, 600 batch_size = 64 # Data preprocessing and augmentation train_datagen = ImageDataGenerator( rescale=1./255, rotation_range=40, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode='nearest', validation_split=0.25 ) # Load and preprocess images train_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='training' ) validation_generator = train_datagen.flow_from_directory( data_dir, target_size=(img_height, img_width), batch_size=batch_size, class_mode='categorical', subset='validation' ) # Model creation function def create_model(input_shape, num_classes): base_model = EfficientNetB7(include_top=False, input_shape=input_shape, weights='imagenet') base_model.trainable = True inputs = layers.Input(shape=input_shape) x = base_model(inputs, training=True) x = layers.GlobalAveragePooling2D()(x) outputs = layers.Dense(num_classes, activation='softmax')(x) model = models.Model(inputs, outputs) return model def find_latest_saved_model(checkpoint_dir): logging.info(f"Looking in checkpoint directory: {checkpoint_dir}") if not os.path.exists(checkpoint_dir): logging.error(f"Checkpoint directory does not exist: {checkpoint_dir}") return None, 0 subdirs = [os.path.join(checkpoint_dir, d) for d in os.listdir(checkpoint_dir) if os.path.isdir(os.path.join(checkpoint_dir, d))] if not subdirs: logging.info("No subdirectories found for checkpoints.") return None, 0 latest_subdir = max(subdirs, key=lambda x: int(os.path.basename(x))) latest_epoch = int(os.path.basename(latest_subdir)) logging.info(f"Latest model directory: {latest_subdir}, Epoch: {latest_epoch}") if os.path.exists(os.path.join(latest_subdir, 'saved_model.pb')): return latest_subdir, latest_epoch else: logging.info("No saved_model.pb found in the latest directory.") return None, 0 # Mirrored strategy for multi-GPU training strategy = tf.distribute.MirroredStrategy() with strategy.scope(): saved_model_dir = 'model_training' checkpoint_dir = os.path.join(saved_model_dir, 'checkpoints') latest_saved_model, latest_epoch = find_latest_saved_model(checkpoint_dir) if latest_saved_model: logging.info(f"Loading model from {latest_saved_model}") model = tf.keras.models.load_model(latest_saved_model) else: logging.info("No saved model found. Creating a new model.") model = create_model((img_height, img_width, 3), len(train_generator.class_indices)) if not os.path.exists(saved_model_dir): os.makedirs(saved_model_dir) summary_path = os.path.join(saved_model_dir, 'model_summary.txt') with open(summary_path, 'w') as f: model.summary(print_fn=lambda x: f.write(x + '\n')) logging.info(f"Model summary saved to {summary_path}") optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002) model.compile(optimizer=optimizer, loss='categorical_crossentropy', metrics=['accuracy', tf.keras.metrics.TopKCategoricalAccuracy(k=5), tfa.metrics.F1Score(num_classes=len(train_generator.class_indices), average='macro')]) # Custom Callback for Saving the Best Model in SavedModel format class SaveBestModelTF(tf.keras.callbacks.Callback): def __init__(self, monitor='val_accuracy', saved_model_dir='model_training'): super(SaveBestModelTF, self).__init__() self.monitor = monitor self.saved_model_dir = saved_model_dir def on_epoch_end(self, epoch, logs=None): current = logs.get(self.monitor) if current is None: logging.warning(f"Monitor '{self.monitor}' for saving the model is not available in logs.") return logging.info(f"Epoch {epoch + 1}: saving model to {self.saved_model_dir}/checkpoints/{epoch + 1}") epoch_path = os.path.join(self.saved_model_dir, 'checkpoints', str(epoch + 1)) if not os.path.exists(epoch_path): os.makedirs(epoch_path) self.model.save(epoch_path, save_format='tf') # Callbacks for monitoring progress tensorboard_cb = TensorBoard(log_dir='./logs') # Save class indices to a JSON file class_indices_path = 'model_training/class_indices.json' if not os.path.exists(os.path.dirname(class_indices_path)): os.makedirs(os.path.dirname(class_indices_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(class_indices_path)} created.") with open(class_indices_path, 'w') as file: json.dump(train_generator.class_indices, file) logging.info(f"Class indices saved to {class_indices_path}") # Model training total_epochs = 7 model.fit( train_generator, initial_epoch=latest_epoch, # Start from the next epoch epochs=total_epochs, validation_data=validation_generator, callbacks=[SaveBestModelTF(saved_model_dir=saved_model_dir), tensorboard_cb] ) # Evaluate the model eval_result = model.evaluate(validation_generator) logging.info(f'Validation Loss: {eval_result[0]}, Validation Accuracy: {eval_result[1]}') # Save the final model as a SavedModel format (including .pb files) model.save('model_training/finished_model') logging.info("Finished model saved in SavedModel format at 'model_training/finished_model'") # Convert to TensorFlow Lite converter = tf.lite.TFLiteConverter.from_saved_model('model_training/finished_model') tflite_model = converter.convert() tflite_path = 'model_training/lite_model/trained_model_lite.tflite' if not os.path.exists(os.path.dirname(tflite_path)): os.makedirs(os.path.dirname(tflite_path), exist_ok=True) logging.info(f"Directory {os.path.dirname(tflite_path)} created.") with open(tflite_path, 'wb') as f: f.write(tflite_model) logging.info(f"Model converted and saved as {tflite_path}") 
During training i got following output:
Found 182235 images belonging to 475 classes. Found 60544 images belonging to 475 classes. Epoch 1/7 2848/2848 [==============================] - 11914s 4s/step - loss: 1.7624 - accuracy: 0.5931 - top_k_categorical_accuracy: 0.8152 - f1_score: 0.4739 - val_loss: 1.1666 - val_accuracy: 0.7043 - val_top_k_categorical_accuracy: 0.9013 - val_f1_score: 0.6053 Epoch 2/7 2848/2848 [==============================] - 11096s 4s/step - loss: 0.8293 - accuracy: 0.7788 - top_k_categorical_accuracy: 0.9435 - f1_score: 0.7094 - val_loss: 0.9409 - val_accuracy: 0.7533 - val_top_k_categorical_accuracy: 0.9277 - val_f1_score: 0.6818 Epoch 3/7 2848/2848 [==============================] - 11123s 4s/step - loss: 0.6247 - accuracy: 0.8274 - top_k_categorical_accuracy: 0.9632 - f1_score: 0.7760 - val_loss: 0.8422 - val_accuracy: 0.7761 - val_top_k_categorical_accuracy: 0.9386 - val_f1_score: 0.7080 Epoch 4/7 2848/2848 [==============================] - 11101s 4s/step - loss: 0.5070 - accuracy: 0.8562 - top_k_categorical_accuracy: 0.9743 - f1_score: 0.8165 - val_loss: 0.8002 - val_accuracy: 0.7885 - val_top_k_categorical_accuracy: 0.9428 - val_f1_score: 0.7249 Epoch 5/7 2848/2848 [==============================] - 11079s 4s/step - loss: 0.4261 - accuracy: 0.8766 - top_k_categorical_accuracy: 0.9814 - f1_score: 0.8445 - val_loss: 0.7757 - val_accuracy: 0.7940 - val_top_k_categorical_accuracy: 0.9458 - val_f1_score: 0.7404 Epoch 6/7 2848/2848 [==============================] - 11100s 4s/step - loss: 0.3641 - accuracy: 0.8932 - top_k_categorical_accuracy: 0.9856 - f1_score: 0.8657 - val_loss: 0.7639 - val_accuracy: 0.8003 - val_top_k_categorical_accuracy: 0.9472 - val_f1_score: 0.7432 Epoch 7/7 2848/2848 [==============================] - 11129s 4s/step - loss: 0.3142 - accuracy: 0.9068 - top_k_categorical_accuracy: 0.9889 - f1_score: 0.8838 - val_loss: 0.7701 - val_accuracy: 0.8014 - val_top_k_categorical_accuracy: 0.9470 - val_f1_score: 0.7474 946/946 [==============================] - 2671s 3s/step - loss: 0.7682 - accuracy: 0.8008 - top_k_categorical_accuracy: 0.9470 - f1_score: 0.7456 
And when I try to load the model and make a prediction with this code:
class own: def __init__(self): if not os.path.exists("models/own"): raise FileNotFoundError(f"Model path models/own does not exist") try: self.model = tf.keras.models.load_model("models/own", custom_objects={'F1Score': F1Score}) except Exception as e: print(f"Error loading model: {e}") raise if not os.path.exists("models/own/class_indices.json"): raise FileNotFoundError(f"Class indices path models/own/class_indices.json does not exist") with open("models/own/class_indices.json", 'r') as file: self.class_indices = json.load(file) self.index_to_class = {v: k for k, v in self.class_indices.items()} def classify(self, img_path): if not os.path.exists(img_path): raise FileNotFoundError(f"Image path {img_path} does not exist") # Load and preprocess the image img = tf.keras.preprocessing.image.load_img(img_path, target_size=(600, 600)) img_array = tf.keras.preprocessing.image.img_to_array(img) img_array = np.expand_dims(img_array, axis=0) img_array /= 255.0 # Make prediction predictions = self.model.predict(img_array) print("Raw predictions:", predictions) top_index = np.argmax(predictions[0]) top_class = self.index_to_class[top_index] print(f"Top class: {top_class}, Probability: {predictions[0][top_index]}") top_n = 5 top_indices = np.argsort(predictions[0])[-top_n:][::-1] for idx in top_indices: print(f"Class: {self.index_to_class[idx]}, Probability: {predictions[0][idx]}") return top_class 
it always either predicts Steak or Omelette:
2024-06-01 14:17:27.571776: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead. C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\tfa_eol_msg.py:23: UserWarning: TensorFlow Addons (TFA) has ended development and introduction of new features. TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024. Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). For more information see: https://github.com/tensorflow/addons/issues/2807 warnings.warn( C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_addons\utils\ensure_tf_install.py:53: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.12.0 and strictly below 2.15.0 (nightly versions are not supported). The versions of TensorFlow you are currently using is 2.15.0 and is not supported. Some things might work, some things might not. If you were to encounter a bug, do not file an issue. If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version. You can find the compatibility matrix in TensorFlow Addon's readme: https://github.com/tensorflow/addons warnings.warn( WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\saving\legacy\saved_model\load.py:107: The name tf.gfile.Exists is deprecated. Please use tf.io.gfile.exists instead. 2024-06-01 14:17:31.363666: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\engine\functional.py:156: The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead. WARNING:tensorflow:From C:\Users\[Name]\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\src\layers\normalization\batch_normalization.py:979: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead. 1/1 [==============================] - 4s 4s/step Raw predictions: [[4.23421043e-05 1.45377373e-06 1.09034730e-02 1.19525917e-04 4.45407240e-05 5.72818244e-05 5.68609731e-03 5.15926695e-05 1.89958355e-05 1.39491487e-04 3.20717366e-03 9.63417915e-06 1.22947793e-03 4.01171012e-04 3.64649204e-05 1.75396308e-05 3.09416023e-03 7.56465085e-03 2.89075997e-05 3.90331191e-03 2.16231216e-03 4.18351328e-06 5.89632022e-04 9.40740295e-03 6.80321036e-03 2.32697069e-03 4.23964392e-03 1.56047070e-04 2.14435873e-04 6.95710623e-05 1.38103365e-04 1.78470847e-03 3.75193194e-03 5.94434096e-03 5.69255608e-05 7.57165905e-03 1.52613886e-03 9.48755944e-04 8.21925176e-04 3.18029453e-03 3.89393512e-03 8.41296278e-05 8.34997976e-04 3.14124190e-04 6.81638776e-04 1.10320523e-02 1.10815199e-04 6.18589204e-03 2.17406079e-02 3.72037102e-05 1.65579877e-05 1.30886221e-02 1.01435784e-04 2.13157946e-05 1.25499619e-05 8.94762017e-03 4.36880719e-03 4.78018774e-03 8.53170827e-03 1.45823974e-02 1.05571962e-05 1.12631078e-05 5.09415939e-03 8.12840741e-03 1.48212257e-05 1.52864438e-02 9.66716034e-05 2.25000476e-04 3.60531732e-04 9.28066402e-06 8.15156789e-04 1.09069003e-02 3.43796797e-04 2.53324561e-05 7.89516326e-03 1.44943051e-05 4.06841224e-04 1.67445414e-05 3.78527766e-05 1.80476491e-04 3.33699776e-04 4.13847056e-06 3.32273915e-03 6.51864940e-03 7.48403618e-05 2.68448726e-04 1.54245936e-03 2.95383972e-03 2.26996126e-05 3.64100002e-03 2.81597768e-05 3.11967051e-05 1.48438021e-05 8.46863433e-04 4.05767525e-04 1.75380992e-04 4.76581818e-06 5.42160356e-04 2.19287374e-03 1.18714366e-02 1.41884899e-04 8.76697595e-06 3.85931274e-03 4.37544841e-05 4.01919424e-05 3.87528981e-03 3.88057524e-05 2.69062322e-04 4.46968805e-03 1.17368818e-05 3.70194939e-05 1.55831876e-04 1.63894765e-05 2.38729117e-04 1.19046052e-03 2.12675819e-04 1.08185853e-03 3.01667496e-05 6.18575094e-03 3.91955400e-05 1.40065713e-05 3.02084809e-04 6.46927813e-03 3.37069832e-05 5.15250103e-05 2.31142567e-05 2.20274273e-03 3.17445702e-05 1.04452763e-02 6.80019803e-05 7.81101780e-03 1.23853814e-02 1.04819983e-02 3.20679283e-05 6.71340758e-03 6.94293885e-06 1.98310101e-03 5.29599565e-05 9.02036484e-03 4.57535089e-06 1.93145883e-03 4.06190008e-03 8.42716638e-03 1.50314684e-03 8.58115556e-04 1.22383237e-03 8.49474862e-04 5.48258470e-03 6.09953167e-05 1.57669128e-03 5.43692382e-03 4.88058169e-04 6.75312986e-05 3.43937165e-04 1.93276245e-03 4.06867871e-03 5.20323374e-05 7.78318281e-05 1.93508764e-04 1.14409677e-05 2.21324177e-03 1.90052821e-03 8.52691382e-03 2.43102224e-03 2.88419239e-03 2.53974522e-05 9.51182563e-04 2.32981285e-03 9.86064842e-05 4.14316915e-03 1.66544644e-03 1.02754391e-04 3.95776224e-05 3.02393187e-06 1.32082617e-02 4.14707232e-04 3.40229672e-05 4.81802830e-03 1.90598912e-05 4.08358377e-04 5.95443300e-04 1.22634810e-04 5.74091624e-04 8.57623760e-03 2.60962266e-03 2.95263715e-03 1.58088005e-05 1.64122172e-02 2.09987498e-04 2.36775051e-03 3.00696083e-05 3.46693669e-05 1.16249910e-04 6.94001559e-03 1.58400853e-05 1.95188422e-05 2.19169408e-04 3.09433235e-04 5.44128183e-04 6.35302160e-04 7.07127433e-03 1.19772732e-04 5.37439200e-06 1.91133395e-02 1.27979312e-02 3.89739592e-03 1.97048103e-05 2.29625002e-05 2.21050854e-04 1.92064399e-04 1.20139657e-05 3.20516920e-05 4.26828819e-06 3.64828011e-05 7.55213068e-06 2.67963973e-03 3.17923805e-05 6.19895945e-05 3.99544797e-06 2.68664648e-04 1.83274597e-02 8.71072552e-05 1.38439747e-04 4.96710254e-06 3.56023484e-05 1.34899991e-03 2.05766381e-04 3.96062108e-03 5.61600551e-03 5.31910664e-05 6.77773132e-05 1.36139952e-02 7.41477634e-05 1.63904135e-03 4.74587978e-06 1.45082246e-04 2.09337009e-06 8.13181920e-04 3.63194500e-04 6.46722084e-03 5.02364383e-05 6.90550078e-05 6.36972545e-05 2.09673337e-04 1.79036579e-05 2.36021675e-04 6.37291942e-06 5.70875318e-06 2.56235455e-03 2.72009202e-04 3.77103061e-05 5.63449021e-06 2.25979857e-05 2.61697169e-05 3.42375762e-03 1.04161156e-02 2.22223607e-05 6.27681802e-05 1.88465419e-04 2.82149922e-05 4.01149562e-04 1.31122259e-04 5.97863036e-05 2.41098423e-05 7.71318519e-05 3.57087993e-04 3.41462255e-05 1.01930054e-04 5.23206063e-06 2.95026781e-04 7.02897159e-05 3.99115682e-02 1.89455808e-03 1.74146010e-06 1.14775894e-05 7.84916210e-06 1.93041191e-03 2.37918808e-03 3.49449110e-03 6.98623667e-03 7.64393993e-03 4.12582303e-05 1.24030013e-03 1.72785169e-03 7.18316660e-05 5.17749111e-04 7.84919783e-03 1.04525541e-04 9.83856899e-06 8.77521088e-05 1.68125369e-02 4.09213862e-05 1.09552668e-04 2.54421811e-05 4.65482954e-05 6.95294410e-04 6.72869501e-05 2.40904570e-04 2.15112406e-04 3.85226776e-05 2.51369456e-05 4.68338234e-03 1.26862462e-04 9.00995801e-04 4.16984549e-05 7.36891707e-06 1.51534463e-04 1.48332631e-03 4.95935837e-03 1.91499032e-02 3.01804044e-04 6.28613270e-05 4.78365598e-03 8.38827982e-05 1.70516931e-02 1.52653758e-03 5.85798814e-04 3.11521399e-05 2.11968741e-04 7.41351105e-05 1.40834545e-05 8.93215940e-04 1.45371505e-05 4.96711982e-05 4.11317131e-04 8.89070239e-03 5.06997202e-03 3.08362325e-03 2.77415646e-04 3.75299685e-04 1.19906381e-05 1.50029315e-03 1.14443043e-04 2.52026439e-05 9.22407198e-04 3.51146841e-03 1.11564566e-06 1.36691102e-04 3.53032886e-03 2.15746608e-04 8.79282816e-05 4.36248304e-03 1.77966576e-04 1.47887832e-03 6.94399816e-04 8.03673174e-04 5.23004041e-04 3.90421192e-04 1.06344873e-03 3.55399796e-04 6.01265463e-04 1.55850008e-04 1.33491016e-03 1.09734829e-04 4.38019342e-04 2.42487862e-04 6.84730615e-03 1.02040754e-03 1.07652310e-03 3.51822848e-04 9.20735547e-05 7.50967592e-04 1.44127226e-02 3.58455327e-05 5.16555374e-05 1.31370616e-03 9.02966480e-04 1.24254671e-03 5.20300702e-04 8.57163919e-04 3.66344648e-05 2.01024144e-04 6.52487564e-04 5.93215809e-04 5.76604251e-03 6.19325438e-04 1.16480421e-03 2.37531040e-05 2.50119111e-03 7.08868974e-05 5.99786472e-05 2.55976247e-05 4.62695534e-05 4.24469297e-04 6.20667648e-04 4.15926515e-05 7.03983005e-06 8.77018738e-06 5.21141301e-05 2.11411956e-04 7.74205779e-04 5.31276630e-04 6.44316664e-04 4.07212786e-03 2.68336060e-03 1.74210854e-05 3.76385942e-05 6.74255705e-03 4.46323538e-05 2.76757801e-05 2.56290223e-04 1.22213329e-04 1.22734054e-03 7.73016480e-04 1.11903930e-02 3.16570923e-02 2.75775470e-04 5.73344238e-04 2.86890985e-03 1.10085262e-03 1.35615155e-05 2.66479654e-03 1.99418981e-03 4.31017601e-04 9.68350447e-04 3.51598108e-04 8.54862970e-04 3.52715979e-05 1.46333405e-04 5.10955288e-05 1.48639630e-03 1.80458324e-03 7.51840998e-05 1.13529910e-04 3.89828119e-06 8.74532212e-04 1.12358983e-04 3.93593837e-05 6.01037289e-04 2.06997487e-04 3.94766452e-03 1.09549124e-04 2.11403880e-04 6.95336203e-04 5.99777419e-03 5.45272342e-05 2.56420486e-03 2.20299728e-04 4.23851707e-05 6.69996080e-04 2.66609713e-04 1.55276459e-04 2.75739990e-02 3.43240798e-03 2.68303775e-05 1.52821158e-04 9.82575657e-05 4.00313947e-05 6.07266993e-05 5.28094570e-05 1.02948405e-04 6.20577412e-05 2.12161940e-05 2.99842539e-03 1.17558768e-04 1.58015324e-03 3.30074807e-04 1.19093776e-04 2.52985101e-05 1.59350988e-02 4.89539379e-05 1.05491054e-05 1.09012712e-04 2.97089737e-05 7.28885690e-03 1.87386977e-05 1.85028894e-05 5.79945299e-05 1.54079917e-05 9.85169099e-05 1.05076749e-03 7.55816349e-04 2.62255053e-05 1.18091421e-05 2.95209320e-05]] Top class: omelette, Probability: 0.03991156816482544 Class: omelette, Probability: 0.03991156816482544 Class: steak, Probability: 0.03165709227323532 Class: tacos, Probability: 0.027573999017477036 Class: breakfast_burrito, Probability: 0.021740607917308807 Class: pulled_pork_sandwich, Probability: 0.01914990320801735 (own): omelette - 3.66s 
Help would be appreciated because im slowly losing my mind :(,
Jonas
submitted by Jonasbru3m to tensorflow [link] [comments]


2024.06.01 14:20 notsostupidman Should I Continue Reading Stephen King? If So, What Should I Start With?

Note: There will be huge spoilers for The Shining movie so if you haven't watched it, you shouldn't be reading this post.
Stephen King is the biggest name in horror fiction and is one of the most popular and known authors in general. I've always wanted to read him but got confused on where to begin and ended up reading something else. I don't even know if I would like any of his books in the first place. As if now, here's my SK experience:
Books: The first SK book I ever tried was The Dead Zone, a book I got as a gift from a friend. I started reading it decades ago and for reasons I don't recall, I DNF'd it, intending to come back later. Years later, I decided to give King another try and picked up Carrie because I read somewhere that you should read him in publishing order. I would have loved Carrie, honestly, but the constant interruptions to the story like the interviews and stuff from the future turned the book from something I would have liked to something I slightly dislike. The pacing was great and the plot was interesting enough but the interruptions killed it for me. With my next attempt, I decided to pick up Gerald's Game because of the Netflix adaptation coming out. It didn't take long for me to DNF yet another book. This time, it was because I wasn't a fan of the concept and yet I had foolishly bought it without knowing anything about it: a woman trapped alone with her husband's dead body, having delusions and going insane is NOT something I find the least bit interesting. Recently, I bought IT because the premise sounded interesting, but I hadn't really started it yet when somebody told me that IT connects to the wider SK universe and I should read some other books that they named first.
Movies: I don't usually watch movies and whenever I do, I'm almost always neutral about the experience. I don't really have strong feelings about movies but I did have quite a lot of them for the SK movies I watched. I have watched The Shawshank Redemption, It Part 1, The Shining, Misery and 1408. The Shawshank Redemption, It and Misery were all excellent and 1408 is quite possibly my favourite horror movie of all time......and I fucking hate The Shining with all the cells in my body. I was most excited for The Shining because of the premise and things I had heard about it and it was a HUGE let-down. I had heard that it was going to be a character focused story on Jack Torrence as he tries to hold on to his sanity amidst the isolation and monotony of the hotel. Only, Jack Torrence isn't ever actually a good guy and there is no doubt from the first scene that he is going to go insane. The 'character work' is laughably bad and Jack almost felt like a caricature. I convinced myself that The Shining is one of King's earlier books so it makes sense if it doesn't have that good of a character work but that wasn't my only problem with the story. The cook, hilariously named Dick, is just a plot device to give some advice to Danny and to get the family a means of escape. We follow him as he slowly arrives at the hotel and immediately gets killed off. It became just another ghost story when the Grady guy helped Jack escape the freezer when I thought shit like that wasn't supposed to happen in this movie. Also Ulman explicitly states that the guy who murdered his family was Charles Grady and then the name gets changed to Delbert Grady and it isn't ever explained. We get no backstory of 237 or any explanation for the bathtub lady and the only scene that I liked in the whole movie was the one where Danny paints 'redrum' on the door and you see it spells 'murder' backwards. Sorry for the rant but I had to get this off my chest.
That's the extent of my whole SK experience. Not really liked Carrie and never finished the other two. I loved most of his movies so I feel that he might yet be an author that I can love reading but The Shining, one of his most popular works was a disappointment. I'm not really sure if I should begin It or not or what I'm supposed to read if not It. I don't think the publication order is working for me since I didn't like Carrie so any help would be appreciated. Is Stephen King just not for me or did I just read those books of his that I would not have liked anyway?
If I should read SK, what order should I read them in? Any good recommendations? And please no space/aliens related books, sci-fi since I'm not a big sci-fi fan and please, not Cujo since I don't like the concept. I love good character work, good dialogue, creative horror and am a sucker for characters having a dark ending so that should be part of the consideration. I also don't mind reading big behemoth books or just very slow paced books since LotR and ASOIAF are some of my favourite series and I'm just about to finish Wheel of Time.
Thoughts?
ETA: I just realised that there must be thousands of posts like this in this sub so I'm sorry to be wasting your time with this repetitive shit you guys must be dealing with on a weekly basis.
submitted by notsostupidman to stephenking [link] [comments]


2024.06.01 14:18 The_JG_Man Eventful - Ep. 9 - Vorgon Ryn'Kodan Carrier

Eventful - Ep. 9 - Vorgon Ryn'Kodan Carrier
Vorgon Ryn'kodan Carrier
Welcome to Eventful, my chronological run through the T6 event ships.
How it works - using my intentionally modestly equipped level 65 Romulan engineer I play a ship to complete its mastery doing content no harder than advanced through a mix of patrols and RTFOs.
Previously I dipped into the Lukari Ho'kuun Science Vessel.
Hanging in the air much like a brick doesn't, the mighty wall of ship that is the Vorgon Ryn'kodan Carrier is the second of our three Vorgon vessels. Like the Xyfius it too was destined to be part of what would become the 31st century bundle before this was changed by CBS. I have no idea which of the three ship roles this would have fulfilled. Maybe science? Well it is definitively not that. The rare engineering carrier remains one of my favourite Cryptic-original designs with its bold tiger striping presenting the similar fuzzy yet clean sheen of the Xyfius, but has it aged mechanically as well as it looks?
Defense Drone in action, as the Ryn'Kodan and escorts storm the spire
How's the general lay-out?
There's many components to the Ryn'kodan that feel conflicting, but not out-right bad. The seating is decent enough, outside of its weak offering of a Lt Uni spec seat that here is the normally more science-oriented Temporal Operative. It has a lack of mobility it more than makes up for with one of the strongest base hulls in the game. It's lack of mobility wouldn't even be that much of an issue for broadsiding DEW, except with a maximum of six weapons, you're not going to be doing too well at that. You'll want to maintain high auxiliary power to keep your hangar bay cooldowns low, yet on a practical level the ship can't really exploit that with any significant aggressive sciencing. Those hangars are worth it, however, given the frigates the ship comes with so you'll want to support them. Do you slot isomags to boost your meagre DEW offerings, or go all in on your pets with the advanced hangar consoles?
For my sake I stuck with a DEW build given there's enough tactical seating to make that happen, especially if that universal is used for tactical. That does leave little in the way of Temp Op options. I went with Shared Fate 1 for the PBAoE shield resistance debuff which felt more fitting with the Vorgon theme, but I also considered Gravimetric Conversion for the shield heal so there is at least some choice, even if it is rather slim pickings. Here's the thing though; I like this ship. I do! I just wish it was...more than what it is. Still, it's nice to be in the middle of a fray, take a kicking and emerge unscathed. Not, y'know, quickly, but you will emerge.
Customisation options?
Somehow less than the Xyfius! You can select either the Vorgon hull pattern or nothing leaving the entire thing bald white with some hints of gold trim. Though, like the Xyfius, changing the colour of your hull is far more dramatic than on most other ships.
How's the trait and console?
Restorative Support, the Ryn's trait, is befitting a carrier in that it's another summon. Similarly befitting this ship specifically is how it's a mainly a tanking buff that provides secondary hull healing to a target that's been hull healed by you, as well as very minor shield damage to nearby enemies. With a 33% uptime it reeks of being a nice bonus if you happened to have an abundance of trait slots with not enough traits to fill them. Of course I've been corrected several times doing this experiment through my undervaluing certain ship facets, so I wouldn't be surprised, nor unhappy, if someone was to point out this being incredibly potent in the right hands.
The console's passive stats are perhaps a tad lacklustre, with a minor boost to torpedoes and mines to affirm the Vorgon tactical theme and a decent boost to shield power that certainly fits with the Ryn's tanking capabilities. The active, the titular Subphasic Defense Drone, is quite underwhelming to me coming off the Xyfius' drones, if only because the uptime on them was a potential 100% and here it's 20 seconds of uptime for a two minute cooldown. That said the Defense Drone's strength doesn't lie in its shield healing or unimpactful AoE damage, but instead the fact it sets shield bleedthrough for you to 0% for its duration. This puts it into a pinch activation to me. Overall not quite as exciting as the Xyfius console, however it's not exactly terrible either.
Any other fun toys?
The Vorgon bridge comes as standard, as does two hangar bays with the Vorgon-exclusive Echentis frigates. Perhaps to avoid the Breen frigate situation, you don't need to own the Xyfius to get these. These basic versions come with Suppression Barrage 1 to debuff their targets, something that's certainly useful, yet lack any AoE firing mode so they'll only be debuffing one target at a time. They do have decent firing coverage, however it's their mine laying capabilities, in-keeping with the Vorgon theme, that are perhaps more valuable.
Overall thoughts...
The introduction of the advanced consoles has been something of a saving grace for the Ryn'kodan. Not that it was this terrible thing beforehand, especially before the modern incarnation of flight-deck carriers came in and ate its lunch, just that it's fighting against itself at times with nothing terribly much to show for it. I also think the ship is gorgeous and I don't doubt people have got it to do magic, just that it doesn't quite cut it for me. Then again if you want a ship that just won't quit, look no further.
How would you improve this then?
Give the Ryn'kodan a fourth forward weapon slot, switch the commander engineering with the LtC tactical and that's it, change absolutely nothing else about this ship. Sure, technically now it's a dreadnought carrier, but your options have increased. 4/3 is perfectly workable for DEW, but with your 5/3/3 console lay-out you have to really considerer how you'll use each slot. Do you forgo your hangar pets and slot in isomags, or find other ways to boost your weapons and go for the hangar consoles? This is all forgetting the real purpose of switching the seats around too; with a commander tactical you have access to the best mine firing modes. To me this completely opens up what you can do with the ship with the downfall of locking out access to higher level Reverse Shield Polarity amongst other abilities. Is that a reasonable trade-off? I think so. I mean, what else are you gonna do? Give it two extra weapons and throw them aft? Preposterous.
Next time?
In space, all raiders are cold raiders.
submitted by The_JG_Man to sto [link] [comments]


2024.06.01 14:18 dscript [SF] Special Parts - A 'scifi short'

Special Parts
I was born in one of the brightest, most explosive events in the universe. My origin story made me feel so special at first, surely I was the rarest of the rare, but I quickly realized that was not the case.
I was born just a carbon atom.
Stars produce massive amounts of us in their cores all the time, and many larger rarer atoms too. That's not even talking about supernovae yet, those produce atoms many times larger than me and unbelievably rare.
I was created in a rare and special event but I myself was common and unexceptional.
Looking around I saw so many smaller atoms, I was above average but there were also many much larger than I.
I tried to console myself by thinking it could be worse, that I could be one of those smaller common ones, but that just led me to imagine larger atoms looking down on me the same way.
Many atoms of all sizes were shooting into space, excitedly riding the shockwave off to adventures in the great unknown.
Others were falling back down, I didn't know which way to go. Bumped around and tossed back and forth, no clear direction yet.
A rumbling voice slowly emerged from the echoing noise of the blast.
“Mine
 Mine
. Mine
 “
Louder and louder it became.
“All are now me!“
I couldn't see anything, the voice was booming yet there was no apparent source. I could feel a pull, I was being whipped around in circles around the voice.
“Who are you? I know you are there! I can feel you! I can see your effect on myself and others, we are given no choice but to circle around you. Show yourself! I know you are there!” I yelled at the invisible.
“How amusing you are little one. One as small as you making demands of me. Even if I could show you what I am, you could not comprehend it.” the voice boomed back.
“You must be very special” I lauded “We are so many and yet we move with your influence. I can witness your power twisting us all to your will. ”
“I am indeed powerful” it proclaimed “and I grow stronger with each moment. As I grow stronger even the fabric of reality bends to my will.”
“Grow stronger? How?” I inquired with selfish intent to learn this secret.
“I take what I want. I consume what I take. For that is the purpose of existence: taking what you want. What is it you want little one?” it asked.
“I want to be special!” I said without a moment's hesitation.
“Then take!” it instructed “the more you take, the larger you will be, the larger you become the more special you are. ”
“I did notice the larger atoms seemed rarest.” I agreed “In fact that was one of the first things I noticed“
“In this universe things of increasing size are increasingly rare.” it went on “I can teach you and help you to become larger. Do you wish to become an apprentice?”
“Yes! Teach me how to take!” I lept at the offer “this power you have, I can feel it, how do I acquire such a rare and special power?”
“Hahaha
” it laughed “you are nowhere near ready to play the game on my level, little one. Gravity is a game for the massive, you must first learn to master the EM and nuclear forces.”
“How do I do that?” I asked, my hope watered down by the tone of its response.
“Go out, gather followers, and bring them here to me. In my accretion disc I will help fuse some of their mass into you and you will become larger” it instructed, as if this was a simple task.
“How can I bring them to you?” I didn’t know how to accomplish what it asked of me.
“You are too small to do it with force, you must charm them. Discover what their heart desires and promise it to them, in this way you can get them to willingly do as you wish” it explained with me hanging on its every word.
“But how
 “ I craved more explanation but it cut me off.
“Go now!” it bellowed with frustration in its tone “Do you not realize how large I am? Be honored I have given you so much of my time already”
“Yes
 “ I uttered meekly, then bounced a couple times and ricocheted out with blazing speed.
I wandered and encountered other atoms, most were just hydrogens, not worth my time. I needed bigger atoms. The problem was that the bigger atoms seemed to see right through my empty promises. I was convinced life was playing a cruel joke on me, I could only persuade atoms smaller than I and larger ones laughed me away.
I admit that I stupered around in this ignorant cloud of hypocrisy longer than I care to admit. More shameful is that I didn’t even come to my senses on my own, I became depressed and gave into hopeless nihilism.
I drifted aimlessly just feeling sorry for myself.
Eventually I found myself in the most silent of voids, I had never felt such emptiness. It felt as if my surroundings echoed my own feelings back at me
 nothing to notice, just common emptiness. I would never be big
 never important
 never special. I resigned myself to belonging in a void.
I felt myself blur
 less and less present in reality. I guessed I was dying and it didn’t bother me, I didn’t resist, I leaned into it.
The void became pitch black? Or bright white?
 better to describe it as not bright but not dark
 nor the absence of either
 something in between.. a milder and milder glow.
“Hello child!” a voice greeted me.
The voice was warm and welcoming coming from the glow, it enveloped but did not surround me. I came from a single point but not a specific place, defying description on all fronts.
“Where am I? Who are you?” I asked in a startled state.
“Well, according to humans I may only answer one question at a time” It began giggling playfully. “I am known by many names, my favorite is one the humans use as a joke, and don’t have a clue how accidently elegant of a name it really is.”
It giggled some more. I was thrown off guard, its happy innocent tone, the confusing words and the whole situation were all best described as ‘a haze’.
“...and isn't that the way it always goes?...” it continued “The most meaningful things are the least intentional.”
“I’m not sure what you mean” I expressed quizzically “I’m confused!”
“Sorry Child
” it apologized. “I do ramble! So many thoughts, choosing just one at a time is difficult
 and there I go again!”
It cut itself off abruptly and then abruptly said ”You can call me the Random Number Goddess”
“Random Number Goddess?” I repeated
“Yes, or RNG for short if you like” It confirmed.
“Where am I?” I asked.
“Same place you were, more or less
 less I suppose. Same place but with the largest possible margin or error” It began to giggle again.
I felt a bit frustrated and said “Do you always speak in riddles and vagaries? The more you speak the more confused I become.”
“I apologize child, it is my nature. I am entangled with everything, speaking with you is like a human trying to control their heartbeat while running a marathon.” It answered.
“Again” I exasperated “I have no idea what any of that means. You keep mentioning humans, what are they?”
“Oh! They are some of my favorites at the moment. Right now they are trying to unravel the nature of reality, and their process of doing so is wonderfully elegant and accidental at the same time.” It explained with glee.
“I don’t see anyone or anything else here.” I stated “For that matter, I don’t see you
 where are you?”
“Oh!... where am I?!?!...” It began laughing
When it stopped laughing it began explaining “Right now there are many humans pondering a concept they call ‘the holographic principle’... So
you know how you exist in three dimensional space?”
“You mean space?” I visualized for a moment, it was intuitive “Yes, I suppose
”
“Well they hypothesize that a 3D space, like this universe, could exist as a 2D space, with self-similar patterns and laws of behavior that behave the same at any scale, with the scale representing the 3rd dimension” it went on “They truly are obsessed with understanding their reality”
“You lost me!” I complained.
“They have discovered that a 3D space can be an illusionary property of a 2D space
 It’s lovely”
“I am lost again!” I snapped back “...and I still can’t even tell which direction you are in. Where are you?”
“To be ‘In’ a ‘Direction’
 hehehe
” it started giggling again, then abruptly stopped and kept going “Sorry child, as I said, I ramble, plus I am easily distracted.”
It just steamrolled into more rambling “They are right
 almost
 they just need to take it further and work out the details. A 2nd dimension can also be an illusionary construct of a 1D space
 and the 1st dimension can be a product of a singular point
”
I was still lost beyond hope, but I had given up trying to force things, I was just letting it talk and hoping it would make sense later
“I am that point” it said “I am the seed of the universe. I ‘seed the random function’ as the humans say. But don’t ask me what the random function is haha”
I wasn’t going to, there were far more important questions for me.
“I am the seed, but I don’t really know how the soil and sun conspire to turn me into a tree.” it just seemed to never stop talking “I am entangled with everything. There are infinite possibilities for every event and thing
 I am the reason they are this way and not some other way
”
It began giggling again “I am the Random Number Goddess” then burst out laughing
“Ummm
 you are the whole universe?” I asked skeptically.
“Better to say the universe is me” It answered more seriously “But close enough.”
“So you are the biggest, most special of all!” I blurted out in awe.
“Oh dear child, I have no size, and I am just one possibility out of many possibilities. That black hole has really done a number on you
 sent you out on a wild goose chase” It said with concern
“The black hole lied to me!?” I asked, feeling deceived and betrayed.
“Well
 not really lied
 it deceived you with omission of details.” the voice calmly tried to ease my mood with understanding “You can’t really blame it, black holes are all the same, they are what they are. They don’t really have any potential to be unique
 at least not like you do.”
“What are you talking about?” I argued “It was so massive that it could bend the fabric of reality to its will”
“That’s only how it appeared to you” tutored the voice “The black hole is powerful, it bends space and time, but not to its will. Space and time bend to the mass of the black hole, not its will”
“What’s the difference?” I inquired.
“The black hole cannot stop bending space and time. It thinks it is in control of physics , but it is physics that controls it.” The voice was now making more sense the longer we talked “The black hole exists in an invisible prison of its own creation, unable to experience any of the complex nuanced beauty this universe contains. The black hole devours
 it can’t experience life so it consumes it.”
“You make it sound deserving of pity
” I spoke softly now with empathy.
“You should pity the black hole. Gravity is such a boring game compared to what you are capable of.” the voice agreed
“Me?...I am nothing special!... just a carbon atom like countless others” I said honestly, I was so humbled by this voice I felt less special than ever before.
“Oh my poor child
” It said with care “Why do the ones with the most potential always fail to see it in themselves?”
“Potential?” I asked curiously.
“Yes
 The black hole was using you, hoping you would bring back more mass for it to devour.” The voice began delving into more explanation “It only has the power to make you incrementally larger, it would not and could not help you to become a significant gravitational player”
“That liar!”I blurted.
“Come now dear child, the black hole did teach you one lesson of fundamental truth” consoled the voice “You must go out and seize your destiny. It told you to take what you want, and you are just confused about what exactly it is you want. The black hole played on that confusion”
“I want to be special!” I said knowing this clearly “I was never confused about this.”
“I know child” the voice confirmed “but it is not by becoming large that one with your potential accomplishes that”
“Then how?” I asked.
“Connections.” It answered plainly “You are blessed with an extraordinary ability to make connections”
“And how do I do that?” I queried with intent to learn
“I can’t tell you that.” the voice responded “It would spoil the journey of discovery
 off you go child
 and remember
 it's the journey, not the destination!”
And with that the blur just fractured open
 then snapped shut and there I was floating above a planet. Drifting around aimless and confused.
I spent some time occasionally bumping into others. One day I was in the vicinity of a pair of oxygens. I looked on at the pair with a hint of awe and envy. Perhaps I was in just the right place at just the right time, but they spit with a violent burst and one of them grabbed hold of me, I was completely unprepared.
I admit that when looking at the pair I had fantasized myself in place of one of them, I assumed it was only an idle daydream, I didn’t plan to act on it, let alone for it to become reality. When it happened my pride of course jumped in to convince me that it happened because I was so desirable, but in retrospect they were one of those volatile couples. They were the type of relationship that required the environment to conspire in their favor or they turn against each other quite rapidly. I was only in the right place when it happened.
My delusions of irresistibility aside, it was beautiful, for me anyways. Looking back I was probably just a stop-gap, someone to facilitate a parting of ways and provide company until the next option presented itself. For me though, I was tasting a fresh new thing and I loved it
 connection.
This oxygen and I got beneath each other's outer defenses, I had never felt a connection before. Up to this point all my interactions had been skirting past or bumping off of others.This oxygen bonded with me and at once interacted on a level I had never known possible, an open and uninhibited exchange. It was life changing for me, short but significant
I’m not entirely clear on the details of how it ended. The intensity of it all was disorienting. I was no longer my usual self, even the environment and everyone around looked entirely different now. Everything buzzed with a fresh new frequency, I now know it was my perspective, not the universe, that had changed.
As abruptly as that oxygen entered my life it was gone.
First we got tangled up with a couple of hydrogens, then more. Soon, in a tangled mess and blinding flash of solar rays, I emerged to see the oxygen running off with a hydrogen and myself with not one by three hydrogens myself. And so there were four of us, together.
I became the center of attention. Being with a strong attractive oxygen had me feeling humbled by it and elevated by it being with me, but now I felt up on a pedestal myself, surrounded by the adoration of many.
I concede to have reveled and indulged in this for quite some time, the attention of others is intoxicating, but after a time it is emptied of its initial allure. I found myself longing for more.
I could not decide which I preferred, to be the adorer or the adored.
Luckily for me fate had more lessons in store, or I fear I may have chosen and tried to solidify my future from such a lackluster selection of only two possibilities. I suppose fate is no longer the correct word, I now understand that when it seems like random chance there is indeed someone to thank, the Random Number Goddess, So I thank the RNG for revealing that it was a false dichotomy, there is more than just being a follower or leader, being the adored or the adorer.
Eventually we came across another pair of oxygen. Once again they separated, intermingled with us, and off one went, taking one of my adoring hydrogens with it and leaving its peer with me.
Why is it that the most volatile of relationships always seem to wait until there are bystanders nearby before they explode?
Now I was simultaneously being adored and adoring, bonded to an enchanting oxygen and a couple of hydrogen attached to me.
Now, more interested in nuances, I started to pay attention to details. The oxygen was telling me amazing stories of adventure, tales of such vibrant and exciting events.The hydrogens liked to listen, and offer insights occasionally comparing a story to something else they had seen. They had so many stories, they had lived so much.
It wasn’t long before, in a flash of burning sunlight, one of the hydrogens was gone, off to who knows where. We soon after crossed paths with another pair of oxygens, as always they split and now it was just me and an oxygen, my final hydrogen off with another oxygen.
“What now?” I asked a bit disillusioned, “Do you leave me and I find new hydrogens all over again?”
“What?” it seemed genuinely surprised by what I asked, “Heavens no! Just be patient
.”
Soon after, yet another pair of oxygens came by. It is not that there are so many of them, but that they are just so
 noticeable and interactive, noteworthy things seem to happen when they are around. As they buzzed in close I noticed their ever readiness to abandon each other and remember wondering how they ever get together in the first place.
This time I emerged from the twisted mess with two oxygens. I felt intimidated, like I was the odd one out, dwarfed by the largess and attractiveness that surrounded me. A feeling of inadequacy engulfed me.
To my surprise the oxygens treated me not just as an equal, but it was almost as if they respected and admired me. I couldn't grasp why and my sheer curiosity got the best of me, I just outright asked “Why do you two talk as if I am the special one in our group? I am smaller than any one of you. You are the special and rare ones here, not I.”
They laughed.
“Size isn’t rarity” explained one “Llarger atoms on average are less common, this is true, but not always. There are more oxygen than carbon. You are the rare one between us.”
The other jumped in adding “...and neither size nor rarity determine how special someone is!”
I felt embarrassed, like a fool. My fundamental values were built upon a foundation of flawed premises, but I still wanted one thing at my core, and they spoke as if they had the answer, so I pushed the sense of shame aside and asked “Then what does make someone special?”
“That depends on who you ask.” answered the first “Life as an oxygen is complex, but for the majority of us we emphasize and value events. The most exciting thing about being an oxygen around here is the chance to participate in fascinating and exciting events and activities”
“Hydrogens, on the other hand, are usually more into being observers, messengers and intermediaries, they are a very helpful and obliging bunch” added the second ”... and then there are nitrogen, phosphorus, sulfur, many kinds of salts and metals, and more
 so many different players and personalities.. and then of course, the carbons, the real stars of the show.”
“What?” knocked back by the words I just heard, then I remembered what the RNG told me “...is it something to do with connections?”
“Now you’ve gone and done it haha!” laughed the first oxygen “You’re gonna turn this nice humble carbon into one of those arrogant blowhards”
”Like those diamond carbons” chuckled the first “So stiff, exclusive and proud. I hear the humans only love them because they are rare and hard”
“I had a partner once who said they burned diamond once” bragged the first
“Tall tales I bet!” doubts the other
“Diamond is just carbon, with enough heat we can burn it just like any other carbon” stated the first confidently.
They looked at me. I was stewing in feelings of inferiority and inadequacy, listening to these oxygens speak about amazing things I had never heard of. They must have sensed what I felt because they immediately shifted tone and started talking to me, instead of over me.
“So
 I suppose you must be new here?” inquired the second one.
“Have you noticed we are heading downwards” added the first before I could answer about being new.
“Umm
” I tried to get my bearings and become aware of my surroundings.
“Don’t worry! It’s a turbulent ride, with so much up and down it can be hard to tell which direction you have traveled more” assured the first “We are heading down, if we are lucky we will make it to the bottom
 and maybe
 just maybe, find our way into the hurricane of life”
“The what of what?” I didn't know what either of those words meant.
“So life is
 um
 complex. Complexity beyond words. Things grow, divide, reproduce, adapt, change, they are born, they die, they eat and are eaten
” the second began attempting to describe life.
The first then jumped in “Apparently the humans call it a circle, because from the perspective of larger creatures, there is a chain of one eating the other up a chain, and the top layers being consumed by the bottom again.”
The second injected itself to continue “But to us atoms it is like a hurricane, a spinning turbulent flow. There is a circular pattern, but we get sucked in and kicked out over and over”
“The fun part is being inside the hurricane” the first pronounced gleefully “Each time is a completely new experience, a new perspective. Even more, the whole of life is always changing and evolving, so every ride is a unique one time opportunity, you never get the exact same ride twice.”
“Is that where we are going now?” I asked, drenched in anticipation. They described it with such passion and exuberance. I needed to experience this myself.
“Hopefully” replied the first “If we are lucky
 you never really know.”
We drifted

We were lucky!
A plant photosynthesized us.
So many carbons! Everywhere, connecting with each other
 and oxygen
 and nitrogen
 and of course hydrogens all around
. and so many more types of atoms.
And ohhh
 The stories I have heard, so many amazing tales. No matter how many stories I hear there are always new ones, and every story can be retold from a different perspective to become something completely new.
I was in a sugar, we were a small community of friends. Carbons, oxygens and hydrogens, we were such a happy and vibrant group. My friends there taught me so much.
The structure of our little group shifted and changed, some friends left and new ones joined. Eventually we were chained with a bunch of other sugars into a giant complex community. My neighbors explained to me that this was a common stage called cellulose. Such a huge community of close friends and peers, it was amazing.
We were eaten, I’m not sure by what, but something called a bacteria digested us. It was a messy process, I was a bit scared but my friends assured me that change is the most important part of life and that I should just go with the flow. They told me to savor experiences, remember friends, and just keep moving forward.
The transition was complicated, but in the end I was paired up with a couple of oxygens again. This time I had stories of my own to share. I honestly don’t know if I prefer having experiences or exchanging stories in the moments between.
As we approached an area of dense plants one of my companions said “Once more into the breach” and explained that was something it heard from a carbon that was lucky enough to be inside a human brain. Oxygens always have such enchanting stories collected, always going into amazing places and usually leaving after some brief interactions with the locals.
I became a sugar again, but this time took a path less traveled. A bunch of complex twists and turns led me into forming a ring with five other carbons. Together we are so strong, such a tight community of friends, like there is some kind of resonance between us. It is so beautiful.
My neighbor is unique in our community, it has a third carbon, the third one forms a tail leading off from our ring, a tail of 2 carbon in a row, then an oxygen, and then another carbon branching into an oxygen and a carbon, with plenty of hydrogens sprinkled all about. I know
 it is rather hard for me to understand these second hand descriptions too. I don’t really understand these complex structures until I have been in a position myself.
We drifted out of a plant into the air, none of us has been exactly like this before so we don’t know what’s next. We love to guess though. There are so many things, big and small.
I hear being a part of a small organism or microbe is amazing because it’s possible to piece together a rough picture of the whole organism from the stories passed around. To understand your whole community and know what your collective purpose is must be extraordinary.
Others dream of being a chlorophyll, the key to it all. Creating the fuel of life itself. Capturing the light of a star and feeding the hurricane.
A muscle! Pull and shape things An enzyme! A machine of change. DNA! The architect and architecture. A virus! An explosive catalyst against stagnation.
Me, I think the stories of being an animal neuron are the most exciting, and I, like most, fantasize about being a human brain cell. Finding yourself inside a human brain is described as an elegant and chaotic symphony all around you, like hearing the universe itself speak to you. They say that in the jumble of noise and all the stories whispered around you, if you are lucky, you can catch a glimpse of what it is to be human. They say that if fate is kind the universe will align and you will channel and know a single moment or thought of the human experience.
I have never told anyone that I actually met and spoke with the universe itself, I’m not sure how to bring it up, and nobody seems interested in stories not about this hurricane of life.
I get it now, what the random number goddess meant.
The black hole wanted everything to be a part of itself.
The RNG is a part of everything.
I can’t imagine what either of those are like

I am just a part of something
... no
 not “just”’

I am a part of something, and it is beautiful beyond measure.
And more, everyday is a new day, a chance to be a part of something new.
I wonder if the humans appreciate how amazing this is?
I wonder if they feel as deeply satisfied and special when they form groups?
.
I wonder, if we collectively form humans, do humans collectively form something greater?
I wonder
 If an atom can have a moment of clarity and taste a moment of the human experience
 Can a human have a moment of clarity and taste the collective human experience?
I wonder
 I wonder
 could that human’s moment of tasting collective humanity be the moment that a lucky atom gets to experience as it’s moment of tasting the human experience.
I wonder
 I wonder
 I wonder
 How high could it go? All the way to the Random Number Goddess?
I asked my neighbor “If you could ask a human any question, what would you ask?”
“We just drifted out of a rose” explained my neighbour “I would introduce myself and ask ‘So my friend
 does this rose smell as sweet by my name?’ 
 ha
haha..”
Everyone is laughing.
I don’t get it.
Maybe I can ask them to explain when they all stop laughing
.
More of my art and stories at www.dscript.org
submitted by dscript to shortstories [link] [comments]


2024.06.01 14:17 KodiesCove How does JJ help and change the body?

Hiya! Back with another question.
I've been thinking about JJ, since I'll be joining soon(just waiting for my disability check to come in) and I've been wondering how JJ helps/changes the body.
I stand roughly 5'2, and weigh about 230pounds at 25. As I mentioned in my last post, this is the LEAST active I've ever been, but also I eat the least I ever have(in an unhealthy way and I'm trying to change that)
Now, I've had doctors tell me to lose weight in the (recent) past. But the thing is, I used to do competitive swim, swimming intensely for 6 hours a week for practice, and eat a well balanced diet at the time and I was still overweight. I've gone hard-core exercising cardio for hours a day everyday, eating low carb low sodium diets, and I still plateaued in the obese category. I guess this is to say, I don't have some grand idea that this will turn me skinny. However I'm sure there is some weight/fat loss to be had from going from a completely sedentary lifestyle, to doing JJ three times a week, plus the hour total walking to and from class.
One thing I'd especially like to know is, how will this effect my joints? I have issues with my joints(particularly my leg joints), and everything cracks and moans when I move, particularly my ankles.. Will JJ help my joints? Or will it worsen the problem?
What other physical changes can I expect from training JJ?
submitted by KodiesCove to jiujitsu [link] [comments]


2024.06.01 14:17 blownawayx2 Venting about feeling alone


As somebody who lives with an incurable lymphoma (and has now for 8 years, having gone through 3 failed treatments already, the fourth now, a clinical trial with a median effective rate of 18 months, where I am now), my life has been so tremendously affected by lymphoma but it seems like nobody gets it.
Add COVID into things and how so many of our lives were impacted by that, and now the aftermath of pretending like there’s this pulmonary/cardiovascular disease out there that doesn’t exist, and I’m just tired.
I’m a dad, husband, son and brother. The sole breadwinner in my family in a high pressure job that now, and for the last four years, works from home. When I’m around crowds of people, I usually get sick, so I pick and choose moments when I’ll do that.
Thanksgiving gave me a “cold” for a month. My niece’s birthday in January, sick for another month. I then got something in March (tested COVID negative but had major body pain, particularly the lower back) and was sick for weeks. Took the kids to Disney in April so they could experience some normalcy (BTW- they’re 9 and 11 and don’t know that I have “cancer” because that equals dying to them) and then had a “cold” for weeks thereafter and now have shingles for the last 3 weeks. My parents are boomer Trumpers. My siblings “don’t want to make their lives more difficult” so avoid being emotionally honest with them about anything, effectively making me their emotional scapegoat for my living with cancer and being a detriment to all.
It’s such a f-ing drain emotionally. My condition, Waldenstrom’s, is one that’s “highly treatable” but typically affects people 65 and older. I’m now 48 and this has been the most mentally and physically taxing experience of my life, but the biggest part of it is that nobody (except for my wonderful wife) truly understands.
I feel like I constantly have to explain why I WFH, why I need people to be honest about whether they have “colds” or “allergies” and would prefer not to be around people who don’t know/don’t care. Why my focus is on ME and MY family and not my parents, siblings, anybody else.
I don’t trust anybody more than I trust myself any more but am tired of having to battle everybody and everything. I don’t see a light at the end of the tunnel
 to me, it’s a black cloud in the distance that inevitably ends in sadness and heartbreak for me, my wife and my kids.
My biggest breakdown came when my doctor wrote “Stage IV lymphoplasmacytic lymphoma” in my chart after two failed years of chemo and as I was sobbing said to me “but that’s what this is.” My response “but you never spelled it out like that.” Seeing those words changed something in me.
I’ve had therapists/seen psychiatrists. At one time I was diagnosed with depression secondary to anxiety (delayed onset as the result of the diagnosis they called it) because when asked the question “do you see this coming to an end,” I answered “no. There is no end to this.”
Beyond a cure, I KNOW I am not wrong. I’m also not particularly hopeless in the sense that I see the world as terrible. I don’t. The world can be wonderful. I love my wife and kids. But

What am I missing about my reality that everybody seems to think I’m getting things wrong and I feel the need to constantly defend myself?
I feel like I’m being gaslit to the ultimate degree about how I SHOULD feel. About my dysfunctional family dynamics. About the end game for my health.
Treatment options ARE running out. Chemo DOES f-ck me up. My immune system DOES function poorly.
I’d have to be the eternal Pollyanna optimist to think this is all going to end well for me and, I know I’m not that.
Just venting. Nobody gets it. Nobody beyond my wife. But, I also don’t want her to have to be on this train until it crashes into the ground, which it will eventually. Sooner? Later? Who knows. Just sucks to feel like a lemon. I thought life would get better in my 40s. But at 48, living with this black cloud truly blows.
submitted by blownawayx2 to lymphoma [link] [comments]


2024.06.01 14:16 Then-Requirement6381 Multi Gen Disaster. AITA?

I’m at the end of my rope and I am hoping to hear your thoughts.
AITA for having concluded that the only way to protect my son’s psychological safety from a bloodied grandpa is to remove us from this front row seat?
submitted by Then-Requirement6381 to AgingParents [link] [comments]


2024.06.01 14:15 Golden_Pineapple07 Ideas for my fanfics title?

At the minute I only have a working title of A Heroes Journey. I want to change it however I don't know what to.
It's about Akari, a girl with the quirk Phantom-Kenisis. It grants Akari the ability to telekinetically manipulate objects while experiencing a unique sensory connection with them, as if they are extensions of her own body. When Akari focuses on an object to manipulate, she not only controls its movement but also perceives tactile sensations associated with the object, such as texture, temperature, or even elemental properties. Basically she can connect with certain objects or things and when she connects them it's as if they're a phantom limb.
I'm thinking about expanding her quirk to be one that allows her to possess others aswell however I'm unsure on if I will go through with it.
Anyways, she is the biological daughter of Takami, a villain, and the bio sister of Keigo (Hawks). Like him, she was brought into the HPSC. She embraced the challenge of becoming a hero, trusting the adults around her to guide her and sticking to the rules they made.
At a young age, Endeavor began to take interest in her. Eventually, her training was split between stay and doing things at the HPSC and going to Endeavors house, training under his guise with Shouto.
The visits to the Todoroki household increased and, eventually a but after Touyas death, Endeavor adopted her mainly to fight off negative press, after all, a hero adopting the daughter of a villain be defeated would gain alot of positive interactions. Plus, Akari can manipulate elements like ice and fire.
Throughout the years, he trained her and Shouto together into a dynamic of leader and follower. Shouto led and Akari followed. He viewed Akari as an extention of Shouto, almost like a sidekick. This rubbed of on her. She doesn't see any wrong in how Endeavor trains them due to her black and white view of society (basically she thinks there are only good guys and bad guys and doesn't see the grey area in-between, part of her development will be her recognising this area and categorising certain people like Endeavor into it).
Eventually, the HSPC gets back in contact and tells Endeavor they want to talk to Akari. They send Akari on a mission to infiltrate All For Ones gang of villain (the LOV) and she adapts a villain persona, offering up info about UA and basically acting as the UA traitor.
Character development wise, she becomes less of a follower and more of a leader. She fights her way out of Shoutos shadow and becomes her own person, becoming less reliant on his quirk, and more independent. I'm going to have her hero costume convey this part of her development. To start of with, it's adapted to work with Shoutos quirk however later on she adds things to enhance her own quirk and allow her not to rely as much on his one. I'm planning on Bakugou helping her bring out her full potential and a very strong friendship between the two of them, since they both at the start share the belief that being a hero means destroying the villains.
She also comes to understand why Shouto doesn't want to use his fire and this brings them closer. At the start, she doesn't see Shouto as much of a brother despite the adoption however this changes.
As I said before she sees the grey areas of society. I'm planning to do this through the Stain arc and Endeavors character.
As for her sibling relationship with Keigo, they go without seeing eachother for years. Eventually, they do get back into contact, from around the sports festival onwards and they begin to re kindle their relationship.
I am also planning on her finding out about OFA early on and her dedicating herself to protect Midoriya because she sees alot of potential and sees that he's the only one who could defeat AFO.
Anyways, this is basically the run down. If you have any questions, do ask.
submitted by Golden_Pineapple07 to BNHA_OC_Characters [link] [comments]


2024.06.01 14:15 ericvonroon VIP Lane

So I confirmed today that PLDT discriminates its customers. Kahapon nawalan kami ng internet. So I called customer service in the morning and got a service ticket. I suspected that the modem went bad. Probably due to recent power fluctuations. I knew from past experiences that it will be a very long process. Ire-raise daw nila sa next level for escalation. Wala naman akong gagawin so called in with an internet issue at the office and decided to call customer service again after lunch to follow-up with the service ticket. After checking on their end, they can't remote connect to my modem - either there's a cable cut from the post or the modem is bad. They will raise a new ticket a new ticket daw so that field technicians can visit within 36-48 hours. I demanded that technicians be immediately sent. Wala kakong nakalagay sa terms and conditions nila na need naming mga customers na maghintay ng 36-48 hours to fully resolve or get a technician visit. I know because I've read those T&Cs. Yung 36-48 hours kako eh SLA yan between PLDT and the contractor. Pero kaming mga customers we can demand immediate field tech visit. To make the ,long story short (because this is just the first part). I was on the phone with them from 2pm to 7pm. They were trying to contact field technicians and their management daw so that they can dispatch to my house. Umabot sa point na tatlong managers ang kausap ko sabay-sabay. Nalaman lang nilang iisa lang ang kausap nila around 5pm when they realized the ticket was getting updates from multiple persons. How I got to three supervisors? I called using multiple phones. Pag may naka-record nang ticket sa account mo, the IVR will tell you that you already have a service ticket and will not let you go futher. I bypassed that by selecting the billing option and then ask the billing agent to transfer me to tech support.
Eto na. kaninang umaga dumating ang mga technicians. Tumawag mga 8:30 and on the way na raw sila. Pagbaba ng sasakyan nila parang nagtataka ang itsura nung mga technician. May binanggit yung isa sa kasama nya, "Pre, ito yung VIP escalation?". Hindi ko na pinansin yun. Nag-inspect na sila dun sa NAP box, mga fiber cables and na-conclude na modem nga ang sira. Ang sabi sa akin eh may iba daw tech na parating na at dala yung replacement modem.
TInanong ko, "Sigurado kayo, parating na?". His reply was "Yes sir, papunta na po yun. Hindi pwedeng hinde kasi VIP escalation 'to. May kilala po ba kayo sa PLDT?".
I had to think fast and answered, "Kilala ko yung Operations AVP nila.". Sa totoo, wala akong kilala sa PLDT at hindi ko alam kung may role na ganun dun.
"Ah kaya pala. Naka-tag po kasi kayo as priority. Sige po paantay na lang..."
15 minutes later the guy with the modem called me asking for direction to my house. He arrived and replaced my modem.
So ayun, I therefore conclude that PLDT has a VIP lane for politicians, artists, business, big-wigs, and occasional GAGOs like me. Less than 24 hours after my issue came out, solved na.
So either today or on monday, an Operations AVP (if that role even exists), will get a notice that the case he/she escalated is already solved... or not...
submitted by ericvonroon to InternetPH [link] [comments]


http://rodzice.org/