Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-1 votes
1 answer
301 views

How can I solve "No file or directory found at ./my_model/model.h5" thrown by tf.keras.models.load_model?

I created a code that tells if a picture of a wave is a raging wave when I enter it into the code. The code is shown below. pip install tensorflow opencv-python import os import cv2 import numpy as ...
user25260259's user avatar
0 votes
0 answers
257 views

Training Dataset on a too big dataset (keras) (google Colab)

I'm trying to train a model with the following code in Colab, using keras: model.fit( x_tr, y_tr, batch_size = 1, callbacks=[model_checkpoint_callback], validation_data = (...
Diego Rando's user avatar
1 vote
2 answers
380 views

Tensorflow federated can't be imported on google collabs notebook

I wrote following codes on a new google collabs notebook: !pip install --quiet --upgrade tensorflow-federated-nightly import tensorflow as tf import tensorflow_federated as tff And I got these error ...
SpiralWire's user avatar
2 votes
1 answer
1k views

flow_from_directory seems to find no images but correctly recognized classes

i have impelmented the code below for loading images from my directory from keras.preprocessing.image import ImageDataGenerator DATA_TRAIN_PATH='/content/drive/MyDrive/persiandataset/PersianDataset/...
mobbbbbbbi's user avatar
1 vote
1 answer
1k views

Keras YoloV3 in on Google Colab, AttributeError: module 'keras.backend' has no attribute 'control_flow_ops

I used Roboflow provided Keras YoloV3 implementation to train my own dataset on Google Colab. Tried to demo run and the AttributeError occurred. Failed Solution1: Github Ticket Tried to change the K....
Ian Cheng's user avatar
0 votes
1 answer
280 views

RuntimeError: Unable to create link (name already exists) When saving second model using Google Colab

I have created a model testing pipeline for use in my internship and is run on Google Colab. This pipeline allows for the testing of multiple sets of models and parameters back-to-back. It will spin ...
Timothy Schommer's user avatar
2 votes
1 answer
660 views

ValueError: Input 0 of layer lstm_17 is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: [None, 128]

Here is the code: from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Embedding, LSTM, RepeatVector, Dense, Reshape Model = Sequential([ Embedding(vocab_size, ...
user avatar
0 votes
0 answers
1k views

Keras crashes when calling model.fit with GPU with large-ish datasets, without giving Out of memory however

I'm working using Google Colab, TensorFlow 2.3.0 and tf.keras I need to run a simple 3D model, that however gets in input a relatively large dataset (batches of 128x128x64x4 images). If I try to run ...
user26067's user avatar
  • 453
0 votes
1 answer
747 views

Why my model always return 0 val loss in Keras Tensorflow when trained on Google Colab?

I'm trying to train an easy model on Colab, but it always returns 0 validation loss when using my own code by!python train.py. However, this code runs perfectly fine on my own computer. Does anyone ...
PokeLu's user avatar
  • 847
0 votes
1 answer
1k views

ResourceExhaustedError: OOM when allocating tensor with shape[32,128,240,240] and type float on Google Colaboratory

I'm using Google Colaboratory to the following U-NET network: def unet(pretrained_weights = None,input_size = (240, 240, 1)): inputs = Input(input_size) conv1 = Conv2D(64, 3, activation = '...
VansFannel's user avatar
  • 46.1k
3 votes
1 answer
1k views

Redirect or view stderr in google colab

I'm trying to view the output of keras.backend.print_tensor in google colab. Some people say that it goes to stderr, assuming IPython notebook is being run locally. How does one view this output? ...
Reza Roboubi's user avatar
3 votes
2 answers
4k views

tf.keras how to save ModelCheckPoint object

ModelCheckpoint can be used to save the best model based on a specific monitored metrics. So it obviously has information about the best metrics stored within its object. If you train on google colab ...
kawingkelvin's user avatar
  • 3,971
3 votes
1 answer
684 views

How to find keras.json file in google colab?

On my local system I know where is the keras.json file present(.keras/keras.json) but when I switched to google colab, I don't know where to find it. I did google search for this problem but have not ...
Rahul Anand's user avatar