tensorflow 2.2.0 pypi_0 pypi
tensorflow-base 2.1.0 gpu_py36h55f5790_0
tensorflow-estimator 2.2.0 pypi_0 pypi
tensorflow-gpu 2.2.0 pypi_0 pypi
tensorflow-gpu-estimator 2.2.0 pypi_0 pypi
tensorflow-probability 0.9.0
やったこと
tensorflow-gpuをcondaで入れましたがバージョンが2.1とでてたんでpip でアップデートしました
なぜかコードを動かすと
jupyter が停止します
print("aaa") # TensorFlowのGPUメモリ使用量の制限 import tensorflow as tf import keras from keras import backend as K from keras.layers.convolutional import MaxPooling2D #使うレイヤーを選択 from keras.layers import Input,Dense, Activation, Multiply,Concatenate,Lambda,Conv2D,LeakyReLU,Flatten,add from keras.models import Model from keras import regularizers #レギュラーライザー from keras.constraints import max_norm #重みとかを2以上にしない(たぶん) from keras.optimizers import Adam #アダムを使用 import time from keras.utils import plot_model from collections import deque class QNetwork : def __init__(self,learning_rate, state_size, action_size): self.input1 = Input(shape=state_size) self.a=Conv2D(32,kernel_size=(3,3),padding='same',activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.input1) self.a=Conv2D(32,(3,3),strides=1,padding='same',activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.a=MaxPooling2D(pool_size=(2, 2))(self.a) self.a=Conv2D(64,kernel_size=(3, 3), padding='same', data_format=None, dilation_rate=(1, 1),activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.a=Conv2D(64,kernel_size=(3, 3), padding='same', data_format=None, dilation_rate=(1, 1),activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.a=Conv2D(64,kernel_size=(3, 3), padding='same', data_format=None, dilation_rate=(1, 1),activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.a=Conv2D(64,kernel_size=(3, 3), padding='same', data_format=None, dilation_rate=(1, 1),activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.a=MaxPooling2D(pool_size=(2, 2))(self.a) self.a=Conv2D(128,kernel_size=(3, 3), padding='same', data_format=None, dilation_rate=(1, 1),activation=LeakyReLU(alpha=0.01), use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) 省略 文字数で怒られました self.a=Dense(550,activation='relu', use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) # < Action Mean > self.mu=Dense(action_size,activation='relu', use_bias=True,kernel_initializer='he_normal',bias_initializer='zeros',kernel_constraint=max_norm(2.), bias_constraint=max_norm(2.))(self.a) self.net_a = Model(input=[self.input1], output=[self.mu]) self.adm = Adam(lr=learning_rate,beta_1=0.9, beta_2=0.999, amsgrad=False) # 誤差を減らす学習方法はAdam
追記
こんなものが表示されてました
Features:
Parallel HDF5: OFF
Parallel Filtered Dataset Writes:
Large Parallel I/O:
High-level library: ON
Threadsafety: OFF
Default API mapping: v110
With deprecated public symbols: ON
I/O filters (external): DEFLATE DECODE ENCODE
MPE:
Direct VFD:
dmalloc:
Packages w/ extra debug output:
API Tracing: OFF
Using memory checker: OFF
Memory allocation sanity checks: OFF
Function Stack Tracing: OFF
Strict File Format Checks: OFF
回答1件
あなたの回答
tips
プレビュー