Demo entry 6719033

task1

   

Submitted by anonymous on Mar 08, 2018 at 04:39
Language: Python 3. Code size: 495 Bytes.

# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
import numpy as np
import tensorflow as tf

b = ary_3=np.arange(1,61).reshape(4,3,5)
tensor_b = tf.convert_to_tensor(b)
tensor_c = tf.reshape(tensor_b, ([10,6]))
sess= tf.Session()
print(sess.run(tensor_b))
print("\n")
print(sess.run(tensor_c))
print("\n")
sess= tf.InteractiveSession()
print("eval=", tensor_b.eval())
print("\n")
sess= tf.InteractiveSession()
print("eval=", tensor_c.eval())

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).