GithubHelp home page GithubHelp logo

Comments (4)

anna-tikhonova avatar anna-tikhonova commented on May 27, 2024

Thank you very much for reporting this issue. Could you provide a full reproducible test case that we could run locally?

from tensorflow_macos.

Andreasgejlm avatar Andreasgejlm commented on May 27, 2024

Certainly. The following code reproduces the up_sampling2d error when run in the Tensorflow_macos venv:

import tensorflow as tf
import numpy as np
from tensorflow.keras import Model, Input, layers, optimizers, utils, losses
tf.compat.v1.disable_eager_execution()

training_data = np.random.rand(32, 256, 256, 3)
y_true = np.random.rand(32, 256, 256, 2)

val_data = np.random.rand(32, 256, 256, 3)

batch_size = 32

train_in = Input((256, 256, 3), name='Input', batch_size=batch_size)
x = layers.Conv2D(128, (3, 3), activation='relu', padding='same')(train_in)
x = layers.MaxPooling2D((2, 2))(x)
x = layers.Conv2D(256, (3, 3), activation='relu', padding='same')(x)
x = layers.UpSampling2D()(x)
x = layers.Conv2D(128, (3, 3), activation='relu', padding='same')(x)


real_branch = layers.Conv2D(128, (3, 3), activation='relu', padding='same')(x)
real_branch = layers.Conv2D(1, (3, 3), activation='relu', padding='same', name="real")(real_branch)
imag_branch = layers.Conv2D(128, (3, 3), activation='relu', padding='same')(x)
imag_branch = layers.Conv2D(1, (3, 3), activation='relu', padding='same', name="imag")(imag_branch)
concat = layers.concatenate([real_branch, imag_branch], axis=3)

model = Model(train_in, concat)

model.summary()
model.compile(optimizer=optimizers.Adam(), loss=losses.mean_squared_error, metrics=['acc'])
model.fit(training_data, y_true, epochs=3, batch_size=batch_size, validation_data=(val_data, y_true))

from tensorflow_macos.

anna-tikhonova avatar anna-tikhonova commented on May 27, 2024

Thank you for providing the code. We will investigate this issue and get back to you.

from tensorflow_macos.

pooyadavoodi avatar pooyadavoodi commented on May 27, 2024

@Andreasgejlm I just verified that this issue is resolved in versions >= v0.1alpha1 of our release. Could you please confirm this.

from tensorflow_macos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.