tensorflow
我的心永远是冰冰哒
这个作者很懒,什么都没留下…
展开
-
tensorlfow记录损失的便捷方式
tensorflow 记录损失的便捷方式原创 2022-09-02 20:53:10 · 173 阅读 · 0 评论 -
tensorflow与pytorch转换总结
tensorfow与pytorch进行转换原创 2022-08-30 23:46:22 · 1771 阅读 · 3 评论 -
tensorflow 1.15.0 GPU ubuntu安装
tensorflw-GPU 安装原创 2022-08-17 23:46:51 · 445 阅读 · 0 评论 -
keras多输出和data_generator使用总结
https://stackoverflow.com/questions/44036971/multiple-outputs-in-keras多输出lossfrom sklearn.datasets import load_irisfrom tensorflow.keras.layers import Densefrom tensorflow.keras import Input, Modelimport tensorflow as tfdata, target = load_iris(retu原创 2022-05-12 10:39:42 · 1157 阅读 · 0 评论 -
tf.keras关于autoencoder的实现含GPU测试
参考:https://github.com/AFAgarap/autoencoders/blob/master/notebooks/0-autoencoder.ipynb实现1"""Implementation of vanila autoencoder in TensorFlow 2.0 Subclassing API"""from __future__ import absolute_importfrom __future__ import divisionfrom __future__ i原创 2022-05-08 11:30:07 · 408 阅读 · 0 评论 -
tf.keras和keras画图
使用1(使用keras画图)import numpy as npfrom keras.models import Sequentialfrom keras.layers import Dense, Activation,Reshapefrom keras.layers import Concatenatefrom keras.utils.vis_utils import plot_modelfrom keras.layers import Input, Lambdafrom keras.mod原创 2022-05-08 10:03:52 · 839 阅读 · 0 评论 -
kears Lambda层学习总结
测试案例Lambda_demo1# index是参数,from tensorflow.keras.layers import Lambdafrom tensorflow.keras.models import Modelfrom tensorflow.keras.layers import Lambda,Inputimport numpy as npimport tensorflow as tf def slice(x,index): return x[:,:,index]#原创 2022-05-08 08:11:54 · 437 阅读 · 0 评论 -
keras自定义层
tensorflow 2.ximport tensorflow as tffrom tensorflow import kerasprint(tf.__version__)print(keras.__version__)## tf2.xxx class Linear(keras.layers.Layer): def __init__(self, units=32, input_dim=32): super(Linear, self).__init__()原创 2022-04-13 19:21:26 · 412 阅读 · 0 评论 -
tensorflow和pytorch设置和查看权重
pytorchimport numpy as npimport torch.nn as nnimport randomimport os import torchimport seaborn as snsimport matplotlib.pyplot as pltdef seed_torch(seed=42): random.seed(seed) os.environ['PYTHONHASHSEED'] = '0' np.random.seed(seed)原创 2022-04-13 09:51:19 · 2219 阅读 · 0 评论