[Neuroimaging] ml on medical images - keras
נתי שטרן
nsh531 at gmail.com
Sun Jul 10 06:01:20 EDT 2022
What's the problem on this code:
import os
from pickletools import float8, uint8
from PIL import Image
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
inputs=[]
for i in os.listdir("c:/inetpub/wwwroot/out"):
for j in os.listdir("c:/inetpub/wwwroot/out/"+i+"/"):
A=Image.open("c:/inetpub/wwwroot/out/"+i+"/"+j)
from matplotlib import pyplot as plt
filename = 'image-test'
# img = ( filename + '.png' )
x=np.array(A,dtype=np.shape(A))
inputs.append(x)
simple_rnn = tf.keras.layers.SimpleRNN(4)
#np.int
output = simple_rnn(inputs=np.array(inputs,dtype=np.ndarray(260, 730, 4))) #
The output has shape `[32, 4]`.
simple_rnn = tf.keras.layers.SimpleRNN(
4, return_sequences=True, return_state=True)
# whole_sequence_output has shape `[32, 10, 4]`.
# final_state has shape `[32, 4]`.
whole_sequence_output, final_state = simple_rnn(inputs)
--
<https://netanel.ml>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/neuroimaging/attachments/20220710/f03caf5c/attachment.html>
More information about the Neuroimaging
mailing list